Commit graph

29336 commits

Author SHA1 Message Date
John Kleinschmidt
a19198d784
build: update_depot_tools on initial install (#47160)
this ensures that python is setup for proper use from depot_tools
2025-05-20 10:40:48 -04:00
reito
263c76df09
fix: prevent gc monitor 2nd pass crash (#46987) 2025-05-20 22:54:03 +09:00
dependabot[bot]
517f5c15b9
build(deps-dev): bump @octokit/rest from 20.1.1 to 21.1.1 (#47159)
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 20.1.1 to 21.1.1.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v20.1.1...v21.1.1)

---
updated-dependencies:
- dependency-name: "@octokit/rest"
  dependency-version: 21.1.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 09:57:30 +02:00
dependabot[bot]
d29293556d
build(deps): bump github/codeql-action from 3.28.15 to 3.28.18 (#47158)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.15 to 3.28.18.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](45775bd823...ff0a06e83c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 09:56:54 +02:00
Shelley Vohr
e0ea069859
build: remove fix_linter_error.patch (#47150)
build: remove fix_linter_error.patch
2025-05-19 22:52:01 +02:00
electron-roller[bot]
7cc76c094a
chore: bump node to v22.15.1 (main) (#47105)
* chore: bump node in DEPS to v22.15.1

* chore: fixup patch indices

* src: fix error handling on async crypto operations

https://github.com/nodejs-private/node-private/pull/709

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-19 16:12:48 -04:00
Charles Kerr
3660432f42
refactor: NativeWindows should prefer widget() over GetWidget() for internal use (#47133) 2025-05-19 21:43:16 +02:00
Charles Kerr
687e50b4f3
refactor: add NativeWindowViews::SetTitleBarOverlay() (#47126)
* refactor: move SetTitleBarOverlay() impl to NativeWindowViews

* refactor: make NativeWindowViews::set_overlay_button_color() private

refactor: make NativeWindowViews::set_overlay_symbol_color() private

refactor: make NativeWindow::set_titlebar_overlay_height() protected

* refactor: simplify downcasting in NativeWindowViews::SetTitleBarOverlay()
2025-05-19 08:19:03 -05:00
David Sanders
d426667a01
build(dev-deps): update @electron/lint-roller and markdownlint-cli2 (#47082) 2025-05-19 14:19:04 +02:00
Charles Kerr
208bbc0504
refactor: add NativeWindow::SetShape() (#47131)
use NativeWindow::SetShape() in api::BaseWindow
2025-05-19 10:29:29 +02:00
dependabot[bot]
e2f496cfbc
build(deps-dev): bump @typescript-eslint/eslint-plugin from 8.7.0 to 8.32.1 (#47135)
build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.7.0 to 8.32.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.32.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.32.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 10:27:22 +02:00
Charles Kerr
1da150f9a3
chore: remove gclient sync macOS CI hack patch (#47123)
chore: remove hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
2025-05-19 10:26:58 +02:00
Calvin
5dd6481e53
fix: explicit microtask scope DCHECK condition (#47134) 2025-05-19 12:08:59 +09:00
dependabot[bot]
d72e622a3f
build(deps): bump slackapi/slack-github-action from 2.0.0 to 2.1.0 (#47060)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](485a9d42d3...b0fa283ad8)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-16 12:55:00 -05:00
Charles Kerr
8efd24c339
perf: don't create unused menuitem icons (#47100)
GTK >= 3.90.0 removed support for menuitem icons. When Electron is
built with GTK >= 3.90.0, our code builds these icons and then throws
them away unused. Instead, let's just not build them.

Our gtk_util::GdkPixbufFromSkBitmap utility uses BGRAToRGBA and is
expensive to call.
2025-05-16 02:43:03 -05:00
Erick Zhao
dc34e8732c
docs: add note on DIP and DPI (#47080) 2025-05-15 16:51:49 -05:00
Charles Kerr
77c58658c5
refactor: decouple NativeWindowViews and GlobalMenuBarX11 (#47094)
The GlobalMenuBar used to hold a raw_ptr reference to its NativeWindow;
but since it doesn't use it & only wants the gfx::AcceleratedWidget info,
let's remove the NativeWindowViews reference.

AFAICT, GlobalMenuBarX11::window_ has never been used
2025-05-15 16:10:56 -05:00
Charles Kerr
d720aea700
refactor: make TrackableObject::weak_map_id() constexpr (#47092)
* refactor: make TrackableObject::weak_map_id() constexpr

refactor: make BaseWindow::GetID() inline and constexpr

* refactor: make NativeWindow::window_id() constexpr too
2025-05-15 16:10:33 -05:00
Charles Kerr
e2bcd8f0aa
test: fix desktopCapturer mocha syntax (#47088)
* test: fix desktopCapturer mocha syntax

do not nest `it` calls in desktopCapturer specs

* empty commit
2025-05-15 16:54:49 -04:00
Robo
99a3e360ec
fix: opening package paths as directory on macOS (#47077) 2025-05-15 12:47:46 -05:00
electron-roller[bot]
883f48b9b4
chore: bump chromium to 138.0.7178.0 (main) (#47086)
* chore: bump chromium in DEPS to 138.0.7178.0

* 6351556: [source-phase-imports] Support Wasm Source Phase Imports

Refs 6351556

* chore: update patches

* 6509682: extensions: Use ChromeExtensionsBrowserClient on desktop Android, part 2

Refs 6509682

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-15 12:47:07 -05:00
Charles Kerr
9a7b73b533
refactor: use kKeyModifiers in IsAltModifier() (#47066)
We probably didn't use this before because IsAltModifier() was written
two years before the KeyModifiers mask was added upstream in 98ec378a.
2025-05-14 11:00:00 -04:00
Charles Kerr
6170a5af40
chore: combine all the "patch out Profiles" changes into a single patch (#47063)
* chore: fold the profile patches into one patch

* chore: e patches all

* chore: patch out ProfileSelections::ApplyProfileSelection()

Another profile reference. Referenced iff making a debug build.
2025-05-14 09:21:11 -05:00
electron-roller[bot]
d65a856bf3
chore: bump chromium to 138.0.7177.0 (main) (#47081)
* chore: bump chromium in DEPS to 138.0.7177.0

* 6530423: [WebContents] Fix IsNeverComposited() calls during initialization

Refs 6530423

* 6512551: [ios] Enable -Wobjc-property-assign-on-object-type

Refs 6512551

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-14 10:08:31 -04:00
Shelley Vohr
f2639d13cc
refactor: remove CreateViewForWidget patch (#46981)
* refactor: remove CreateViewForWidget patch

* chore: rm unintended osr change

* Trigger CI

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-14 21:43:23 +09:00
Charles Kerr
11fa915724
refactor: remove introduce_ozoneplatform_electron_can_call_x11_property.patch (#47075)
* refactor: use x11_util::IsX11() in BuildSubmenuFromModel()

* refactor: use x11_util::IsX11() in ElectronDesktopWindowTreeHostLinux::OnBoundsChanged()

* refactor: use skia_can_fall_back_to_x11 in x11_util::IsX11()

it is identical in practice to electron_can_call_x11 and does not require a Chromium patch

* chore: remove introduce_ozoneplatform_electron_can_call_x11_property.patch

* refactor: use ui::GetOzonePlatformId() to test for x11
2025-05-14 13:38:35 +09:00
David Sanders
9aacc473e6
build: remove patch that landed upstream (#47079) 2025-05-13 20:10:48 -05:00
Charles Kerr
c218128675
chore: remove disable_unload_metrics.patch (#47059) 2025-05-13 14:55:59 -04:00
electron-roller[bot]
e3e647d21e
chore: bump chromium to 138.0.7175.0 (main) (#46986)
* chore: bump chromium in DEPS to 138.0.7166.0

* chore: bump chromium in DEPS to 138.0.7166.2

* 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

6508373

* 6470924: Introduce auto-populated Search Engine icons.

6470924

* 6502977: Force same tab navigation while actor coordinator is acting on a tab

6502977

* chore: bump chromium in DEPS to 138.0.7168.0

* chore: update patches

* fix grit patch

* chore: bump Chromium to 138.0.7169.2

* fixup! 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

* 6493688: NavigationThrottleRunner2: void CreateThrottlesForNavigation

6493688

* 6488755: Reland "WebSQL: Remove WebPreference"

6488755

* 6428707: FSA: Only normalize the hardcoded rules once during initialization

6428707

* chore: fixup patch indices

* chore: bump chromium in DEPS to 138.0.7170.0

* 6514121: Remove origin calculation debug info and related methods

 6514121

* chore: bump chromium in DEPS to 138.0.7172.0

* chore: bump chromium in DEPS to 138.0.7173.0

* chore: bump chromium in DEPS to 138.0.7175.0

* fixup! 6514121: Remove origin calculation debug info and related methods

Refs 6514121

* 6531585: Don't retry LayerTreeSink creation on the high priority queue

Refs 6531585

* 6512253: Modernize base::apple's base bundle ID

Refs 6512253

* fixup! 6428707: FSA: Only normalize the hardcoded rules once during initialization

Refs 6428707

* fixup! 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

Refs 6508373

* 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: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-13 14:51:20 -04:00
Shelley Vohr
7ab032f594
fix: white window flicker on window creation (#47022) 2025-05-10 18:24:35 -05:00
Erick Zhao
2493e530d0
docs: unify [!NOTE] structure (#46893)
* docs: unify [!NOTE] structure

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/browser-window.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/download-item.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/global-shortcut.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* revert line break

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-09 14:36:42 -07:00
Michaela Laurencin
10e4f9ad37
feat: enable secondary label for macOS menu (#46887)
* feat: enable secondary label for macOS menu

* Update shell/browser/ui/cocoa/electron_menu_controller.mm

Co-authored-by: Robo <hop2deep@gmail.com>

* fix for lint

* update docs for sublabel

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-05-09 12:05:26 -04:00
Michaela Laurencin
b9f0aebb2f
feat: enable innerWidth and innerHeight for window open (#46749)
* feat: enable innerWidth and innerHeight for window open

* update comment for added special innerWidth and innerHeight

* update 100 min spec requirement handling

* update testing to include getContentSize

* update macOS min requirement handling

* adjust refactored consts

* update const values from nativewindowviews
2025-05-09 12:03:45 -04:00
Shelley Vohr
8ecd731e96
fix: webview crash on focus (#46979) 2025-05-09 17:56:22 +02:00
Shelley Vohr
75cf8ea96d
fix: restore previous Windows screenshotting (#47020)
Fixes https://github.com/electron/electron/issues/45990

We previously made a change in https://github.com/electron/electron/pull/45868
to fix content protection being lost on hide and re-show. However, this
cause a breaking change where protected windows were made opaque black
instead of being hidden as before. This overrides relevant methods in
ElectronDesktopWindowTreeHostWin to restore the previous behavior.
without regressing the original issue.
2025-05-09 09:38:27 -05:00
Aman Karmani
376634c75a
feat: add support for --experimental-network-inspection (#46690)
* feat: add support for `--experimental-network-inspection`

* docs: fix minor formatting issues

visible on both GH[1] and the docs site[2]

[1] https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#nodejs-flags
[2] https://www.electronjs.org/docs/latest/api/command-line-switches#--inspect-brkhostport

* docs: add entry for new nodejs flag
2025-05-09 09:44:14 -04:00
Robo
8e8d3a4f3e
fix: use-after-move of bus connection in xdg portal detection (#47008) 2025-05-09 18:32:08 +09:00
Charles Kerr
2cbd968da5
refactor: use gin_helper::Dictionary::ValueOrDefault() (#46982)
* refactor: use ValueOrDefault() in electron_api_web_contents.cc

* refactor: use ValueOrDefault() in electron_api_url_loader.cc

* refactor: use ValueOrDefault() in electron_download_manager_delegate.cc

* refactor: use ValueOrDefault() in electron_touch_bar.mm

* refactor: use ValueOrDefault() in electron_url_loader_factory.cc

* refactor: use ValueOrDefault() in electron_browser_context.cc

* refactor: use ValueOrDefault() in electron_touch_bar.mm

* refactor: use ValueOrDefault() in blink_converter.cc

* feat: add ValueOrDefault() to PersistentDictionary

* empty commit

* refactor: use ValueOrDefault() in blink_converter.cc

* refactor: inline the rectangle base::Value::Dict

* refactor: remove has_scroll temporary

---------

Co-authored-by: Deepak Mohan <hop2deep@gmail.com>
2025-05-08 14:17:22 -05:00
Keeley Hammond
aea7b4ae8c
build: update hasher return value (#47009) 2025-05-08 11:34:21 -07:00
Charles Kerr
9f8a629126
refactor: reduce use of NativeWidgetPrivate (#46942)
* refactor: do not use native_widget_private() in NativeWindowViews::SetContentProtection()

refactor: do not use native_widget_private() in NativeWindowViews::IsContentProtected()

* refactor: do not use native_widget_private() in NativeWindowViews::Show()

* chore: remove native_widget_private #include from native_window_views_win

Not needed since Feb 2025: 9199d5c6
2025-05-08 09:02:19 -05:00
Charles Kerr
d4ca829069
test: enable hasShadow tests on Linux (#46984)
refactor: enable hasShadow tests on Linux
2025-05-08 10:07:10 +02:00
Charles Kerr
54a6bbb4cb
build: remove skip_atk_toolchain_check.patch (#46988)
chore: remove skip_atk_toolchain_check.patch
2025-05-08 10:06:55 +02:00
Charles Kerr
24f1f7ed57
build: remove deps_add_v8_object_setinternalfieldfornodecore.patch (#46992)
chore: remove deps_add_v8_object_setinternalfieldfornodecore.patch

This was a Node 20-specific workaround that's no longer needed in Node 22.

Xref: https://github.com/nodejs/node/pull/49874.
2025-05-08 09:39:58 +02:00
Keeley Hammond
153dae5b48
build: move release script to new hasher function (#46989)
build: move to new hasher function
2025-05-08 01:15:08 -05:00
Calvin
580fa57a29
refactor: Node.js temporary "explicit" microtask policy scope pattern (#46973)
refactor: Node.js explicit microtask scope pattern
2025-05-08 10:21:39 +09:00
Calvin
37639b5400
refactor: replace gin_helper::MicrotasksScope with v8::MicrotasksScope (#46963)
* Remove microtasks_scope.h and microtasks_scope.cc

* Use v8::MicrotasksScope when ignoring browser checkpoint

These call always skip the browser checkpoint, so they are equivalent to using v8::MicrotasksScope directly (modulo the optional wrapper behavior).

* Remove MicrotasksScope from node_bindings.cc

This code seems contradictory: it explicitly specifies "do not run microtasks" yet runs a microtask checkpoint in the browser process.

Looking at its history, it [was introduced][1] with the intention to not run microtasks, but a [subtle C++ language behavior][2] caused it to do the opposite later in the same roll. Since the original intention was to not run microtasks, and since that is also the simplest explanation, we can assume `ignore_browser_checkpoint` should be true and migrate this to `v8::MicrotasksScope` as it is equivalent (modulo the optional wrapper behavior).

[1]: a4ea80dd47 (diff-efe58cf03c97028f37f801db044d396a5f428686da6595d2c692f1c052bbd09c)
[2]: https://github.com/electron/electron/pull/43185

* Migrate gin_helper/promise.h and gin_helper/promise.cc to v8::MicrotasksScope

Restores the [original][1] behavior of running the microtask checkpoint at destruction, but preserves the behavior of running microtasks in the browser process. This had last changed in the migration to gin_helper::MicroTasks.

[1]: https://github.com/electron/electron/pull/16401
2025-05-07 14:10:34 -05:00
electron-roller[bot]
a8695d4387
chore: bump chromium to 138.0.7166.0 (main) (#46975)
* chore: bump chromium in DEPS to 138.0.7165.0

* 6492127: Add new less invasive context menu mode for mobile interesttarget

6492127

* chore: fixup patch indices

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-07 13:04:15 -04:00
Charles Kerr
924a8da940
refactor: use WidgetDelegate::SetAccessibleTitle() (#46765)
* refactor: use WidgetDelegate::SetAccessibleTitle()

* test: add window.accessibleTitle tests
2025-05-07 10:44:53 -05:00
Shelley Vohr
c16ea8d54e
fix: printing when no mediaSize specified (#46937)
fix: printing when no mediaSize specified
2025-05-06 19:12:25 -05:00
Charles Kerr
b7ae162716
refactor: add gin_helper::Dictionary::ValueOrDefault() (#46939)
* feat: add gin_helper::Dictionary::ValueOrDefault()

A convenience function for using a default value if the
specified key isn't present in the dictionary.

* refactor: use ValueOrDefault() in native_window.cc

* refactor: use ValueOrDefault() in native_window_mac.mm

* refactor: use ValueOrDefault() in native_window_views.cc

* refactor: use ValueOrDefault() in electron_api_native_image.cc
2025-05-06 15:20:12 -05:00