Commit graph

3409 commits

Author SHA1 Message Date
trop[bot]
75cda9e16b
feat: support customizing window accent color on Windows (#47537)
* fix: support window accent color in frameless windows

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* refactor: allow customization

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update docs/api/structures/base-window-options.md

Co-authored-by: Will Anderson <andersonw@dropbox.com>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-25 20:41:42 +02:00
trop[bot]
253d49b24f
fix: ensure /dev/null fd is closed on failure (#47543)
* fix: ensure /dev/null fd is closed on failure

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: ignore closehandle for windows

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Robo <hop2deep@gmail.com>
2025-06-24 21:12:21 +02:00
trop[bot]
285bbc560b
refactor: simplify titlebar overlay initialization (#47524)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-24 10:39:53 +02:00
trop[bot]
713030b21a
feat: add menu item role palette and header (#47245)
* feat: add menu item role `palette` and `header`

Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>

* adds comments

Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>

* refactors new role items to new item types

Co-authored-by: Gellert Hegyi <gellert@poolside.ai>

* docs: custom type

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* docs: note types only available on mac 14+

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>
Co-authored-by: Gellert Hegyi <gellert@poolside.ai>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-06-23 19:54:53 -04:00
trop[bot]
2f1dfc73ac
feat: support HIDDevice.collections (#47483)
* feat: support HIDDevice.collections

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update docs/api/structures/hid-device.md

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-18 20:47:06 +02:00
Keeley Hammond
03c32ba3be
fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47485)
fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47482)

Revert "refactor: move `IsClosed()` and `IsClosable()` tests into `NativeWindow::Close()` (#46888)"

This reverts commit 3faddd5ae2.
2025-06-16 21:20:53 -07:00
trop[bot]
bef6e11b9d
refactor: move gin::Converter<PreloadScript> impl to a .cc file (#47466)
refactor: move gin::Converter<PreloadScript> impl to a .cc file

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-16 11:10:01 -04:00
trop[bot]
f72ec2c45a
refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath> (#47453)
* refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* fixup! refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-13 10:03:03 +02:00
trop[bot]
2f4472f058
fix: crash calling Fetch.continueResponse with WebContentsView (#47444)
fix: crash calling Fetch.continueResponse with WebContentsView

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-11 12:25:18 -05:00
electron-roller[bot]
5953dca8be
chore: bump chromium to 138.0.7204.15 (37-x-y) (#46980)
* chore: bump chromium in DEPS to 138.0.7166.1

* chore: bump chromium in DEPS to 138.0.7166.2

* chore: bump chromium in DEPS to 138.0.7168.1

* chore: bump chromium in DEPS to 138.0.7169.2

* chore: bump chromium in DEPS to 138.0.7170.1

* chore: bump chromium in DEPS to 138.0.7172.1

* chore: bump chromium in DEPS to 138.0.7173.0

* chore: bump chromium in DEPS to 138.0.7175.0

* chore: bump chromium in DEPS to 138.0.7177.1

* chore: bump chromium in DEPS to 138.0.7178.2

* chore: bump chromium in DEPS to 138.0.7180.1

* chore: bump chromium in DEPS to 138.0.7181.0

* chore: bump chromium in DEPS to 138.0.7182.2

* chore: bump chromium in DEPS to 138.0.7184.0

* chore: bump chromium in DEPS to 138.0.7186.0

* chore: bump chromium in DEPS to 138.0.7188.0

* chore: bump chromium in DEPS to 138.0.7190.1

* chore: bump chromium in DEPS to 138.0.7192.0

* chore: bump chromium in DEPS to 138.0.7194.1

* chore: bump chromium in DEPS to 138.0.7196.1

* chore: bump chromium in DEPS to 138.0.7198.1

* chore: bump chromium in DEPS to 138.0.7200.0

* chore: bump chromium in DEPS to 138.0.7202.0

* chore: bump chromium in DEPS to 138.0.7204.0

* chore: bump chromium in DEPS to 138.0.7204.5

* chore: bump chromium in DEPS to 138.0.7204.4

* 6543986: Mac: decouple deserializing and applying sandbox policy

Refs 6543986

(cherry picked from commit d386063e9d2414a35c91c4fa017665d950de5882)

* 6566111: Change UtilityProcessHost to manage its instance internally
Refs 6566111

(cherry picked from commit 93a0a91d447c118de33efec079365f5d0e8363db)

* chore: update patches

* 6577970: Remove superfluous includes for base/strings/stringprintf.h in headers
Refs 6577970

(cherry picked from commit 9ba045f3715d85792e4aa12139e7e05e0b772634)

* 6568811: Add FunctionCall structured metrics event for DevTools
Refs 6568811

(cherry picked from commit 79ae6f2c8b53568b6277998cfe9a91e3a1ee595b)

* [PDF Ink Signatures] Support PdfAnnotationsEnabled policy

6558970

* Mac: Switch to Xcode 16.3 (16E140) and SDK 15.4 (24E241)

6431799

* chore: bump chromium in DEPS to 138.0.7204.15

* chore: update patches

* fixup Mac: decouple deserializing and applying sandbox policy

6543986

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-09 09:32:23 -04:00
trop[bot]
9f4b16fa81
fix: rework lifetime mgmt of ClearDataTask/ClearDataOperation (#47412)
* fix: rework lifetime mgmt of ClearDataTask/ClearDataOperation

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update shell/browser/api/electron_api_session.cc

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update shell/browser/api/electron_api_session.cc

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update shell/browser/api/electron_api_session.cc

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update shell/browser/api/electron_api_session.cc

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-08 12:56:35 +02:00
trop[bot]
a6569b116e
fix: printing PDF via webContents.print() (#47398)
fix: printing PDF via webContents.print()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-08 12:56:02 +02:00
trop[bot]
3fdb77abf1
feat: allow intercepting mouse events (#47364)
* feat: allow intercepting mouse events

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: add specs

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update spec/api-web-contents-spec.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-05 15:47:42 +02:00
trop[bot]
2e2d1f1612
feat: expose win.isContentProtected() (#47310)
* feat: expose win.isContentProtected()

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: remove stray _isContentProtected

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-05 15:46:57 +02:00
trop[bot]
1d8e9e1d52
fix: addChildView() crashes when adding a closed WebContentsView (#47338)
fix: addChildView() crashes when add a closed WebContentsView

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sida Zhu <zhusida@bytedance.com>
2025-06-04 14:08:49 +02:00
trop[bot]
ca22facaaf
chore: bump chromium to 138.0.7190.0 (37-x-y) (#47349)
* chore: bump chromium in DEPS to 138.0.7180.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 6546797: Add a metric for the overall success of the "safe storage" item retrieval.

Refs 6546797

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 6548078: extensions: Fix TODO in ScriptInjectionTracker for desktop Android

Refs 6548078

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 6544950: Revert "FSA: Only normalize the hardcoded rules once during initialization"

Refs 6544950

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: bump chromium in DEPS to 138.0.7181.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fix: correctly clamp HSL shift values between 0 and 1

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: bump DEPS to 138.0.7183.0

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 6553142: Remove SelectFileDialogLinuxKde | 6553142

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: bump chromium in DEPS to 138.0.7184.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7186.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7190.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 6547778: Remove some superfluous //ui/gfx includes from //chrome headers | 6547778

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | 6556022

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fix: remove pdf_extension_util::AddAdditionalData 4099130

This was removed 2 years ago in Chrome.

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fix: provide BrowserContext to pdf_extension_util::AddAdditionalData 6558173

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fixup! 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | 6556022

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fix: pass in navigation throttle registry 6536175

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fixup! 6556022: Reland "FSA: Only normalize the hardcoded rules once during initialization" | 6556022

This partially reverts commit 20d709dd15ba0ff332e24ee314149d642dc5d47c.

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 6545984: corner-shape: render dashed & dotted borders Refs 6545984

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* Update corner smoothing expected images

Co-authored-by: clavin <clavin@electronjs.org>

* Apply "future" revert commit to fix windows build

> Reason for revert: Multiple eng reporting that this is causing build failures due to too-long pathnames, with no immediate feasible workaround

This issue also affects our CI builds.

Problematic CL in current roll: 6494836: [webgl] Add stub WebGL[2]RenderingContextWebGPU | 6494836
"Future" revert CL: 6565622: Revert "[webgl] Add stub WebGL[2]RenderingContextWebGPU" | 6565622

This patch should automatically disappear when we roll the revert.

Co-authored-by: clavin <clavin@electronjs.org>

* 6533919: win: don't add WS_CAPTION style to popup windows 6533919

This mirrors the change made earlier to the code ours is based on: 6374074: [headless] Provide headless aware window metrics on Windows | 6374074

Co-authored-by: clavin <clavin@electronjs.org>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-03 17:06:30 -04:00
trop[bot]
47e0baf21d
fix: regression with directory selection in macOS dialogs (#47277)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-27 11:17:32 -04:00
trop[bot]
f9b86609a9
fix: titlebar showing in content protected window (#47266)
Closes https://github.com/electron/electron/issues/47152.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-27 14:24:48 +02:00
trop[bot]
7dd024a9dc
chore: debug crash on DevTools SetOwnerWindow (#47263)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-26 20:32:45 -07:00
trop[bot]
c0149676fb
refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop() (#47237)
refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-25 07:56:50 -05:00
trop[bot]
e53a7c7c00
fix: remove extra 'suspend'/'resume' handling from powerMonitor (#47188)
fix: remove extra 'suspend'/'resume' handling from powerMonitor

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-22 00:01:17 -05:00
trop[bot]
63052c45a1
refactor: prefer base::circular_deque over std::deque (#47192)
* refactor: use base::circular_deque in ResolveProxyHelper

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: use base::circular_deque in GetExtraCrashKeys()

refactor: reduce visibility of kMaxCrashKeyValueSize

This change is to match Chromium's usage advice from
base/containers/README.md: `base:circular_deque` is preferred over
`std::deque` to provide consistent performance across platforms.

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-21 15:49:18 -05:00
trop[bot]
28c5f7026f
refactor: make NativeWindow::transparent_ const (#47198)
* refactor: use in-class member initialization for NativeWindow::widget_

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: make NativeWindow::transparent_ const

refactor: make NativeWindow::enable_larger_than_screen_ const

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: make linter happy after rebase

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-21 15:32:52 -05:00
trop[bot]
c78be76176
refactor: make NativeWindow::has_client_frame_ const (#47180)
* refactor: make NativeWindow::has_client_frame_ const

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: make NativeWindow::has_client_frame_ const but not constexpr

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-21 11:44:36 +02:00
trop[bot]
73dd132202
refactor: match upstream macOS a11y handling (#47170)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-21 10:31:47 +02:00
trop[bot]
f6e7cdb8b6
refactor: make NativeWindow::pending_transitions_ a base::queue (#47181)
refactor: make NativeWindow::pending_transitions a base::queue

Follow the base/containers/README.md advice that "Chromium code should
always use `base::circular_deque` or `base::queue` in preference to
`std::deque` or `std::queue` due to memory usage and platform variation."

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-20 21:02:47 -05:00
trop[bot]
692d648edb
refactor: NativeWindows should prefer widget() over GetWidget() for internal use (#47155)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-19 18:52:14 -05:00
trop[bot]
cc302c2f07
perf: don't create unused menuitem icons (#47129)
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.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-16 08:47:16 -05:00
trop[bot]
d7990ca180
refactor: decouple NativeWindowViews and GlobalMenuBarX11 (#47119)
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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-15 19:39:05 -05:00
trop[bot]
7cb5a46b66
refactor: make TrackableObject::weak_map_id() constexpr (#47115)
* refactor: make TrackableObject::weak_map_id() constexpr

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: make NativeWindow::window_id() constexpr too

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-15 19:38:34 -05:00
trop[bot]
7db9671420
chore: bump chromium to 138.0.7178.0 (37-x-y) (#47106)
* chore: bump chromium in DEPS to 138.0.7178.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

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

Refs 6351556

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

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

Refs 6509682

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
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 16:47:39 -04:00
trop[bot]
a3d19d7a99
fix: opening package paths as directory on macOS (#47108)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-15 16:11:05 -04:00
trop[bot]
bf54b8d709
feat: enable innerWidth and innerHeight for window open (#47039)
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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-05-14 16:02:46 -05:00
trop[bot]
ec83c1303c
feat: enable secondary label for macOS menu (#47042)
* feat: enable secondary label for macOS menu

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

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

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

Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>

* fix for lint

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

* update docs for sublabel

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-05-14 16:02:32 -05:00
trop[bot]
ec1b0f4923
refactor: remove CreateViewForWidget patch (#47084)
* refactor: remove CreateViewForWidget patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: rm unintended osr change

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-14 16:01:44 -05:00
trop[bot]
be5b02386d
chore: bump chromium to 138.0.7177.0 (37-x-y) (#47085)
* chore: bump chromium in DEPS to 138.0.7177.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

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

Refs 6530423

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

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

Refs 6512551

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
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 13:55:23 -04:00
trop[bot]
df8ed0acc3
refactor: use kKeyModifiers in IsAltModifier() (#47089)
We probably didn't use this before because IsAltModifier() was written
two years before the KeyModifiers mask was added upstream in 98ec378a.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-14 12:53:59 -05:00
trop[bot]
8de0bb5bc3
chore: bump chromium to 138.0.7175.0 (37-x-y) (#47078)
* chore: bump chromium in DEPS to 138.0.7166.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7166.2

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

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

6508373

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6470924: Introduce auto-populated Search Engine icons.

6470924

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

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

6502977

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 138.0.7168.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fix grit patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump Chromium to 138.0.7169.2

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6493688: NavigationThrottleRunner2: void CreateThrottlesForNavigation

6493688

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6488755: Reland "WebSQL: Remove WebPreference"

6488755

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

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

6428707

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 138.0.7170.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 6514121: Remove origin calculation debug info and related methods

 6514121

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 138.0.7172.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7173.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7175.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

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

Refs 6514121

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

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

Refs 6531585

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

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

Refs 6512253

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

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

Refs 6428707

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

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

Refs 6508373

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
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-14 10:07:45 -04:00
trop[bot]
25c7f0017a
fix: white window flicker on window creation (#47051)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-11 15:00:11 -05:00
trop[bot]
ace7ef4316
fix: restore previous Windows screenshotting (#47033)
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.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-09 13:10:44 -04:00
trop[bot]
0e9c0d8c04
fix: use-after-move of bus connection in xdg portal detection (#47023)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-09 09:39:17 -05:00
trop[bot]
3d836267ed
refactor: use gin_helper::Dictionary::ValueOrDefault() (#47014)
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: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-09 09:36:47 +02:00
trop[bot]
2c6f713d72
refactor: reduce use of NativeWidgetPrivate (#47006)
* refactor: do not use native_widget_private() in NativeWindowViews::SetContentProtection()

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: remove native_widget_private #include from native_window_views_win

Not needed since Feb 2025: 9199d5c6

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-08 15:33:43 -05:00
trop[bot]
5602efb2b6
fix: printing when no mediaSize specified (#46971)
fix: printing when no mediaSize specified

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-07 09:36:17 +02:00
trop[bot]
c9d1615b19
refactor: add gin_helper::Dictionary::ValueOrDefault() (#46969)
* feat: add gin_helper::Dictionary::ValueOrDefault()

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: use ValueOrDefault() in native_window.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: use ValueOrDefault() in native_window_mac.mm

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: use ValueOrDefault() in native_window_views.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: use ValueOrDefault() in electron_api_native_image.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-06 19:11:30 -05:00
trop[bot]
4597f4ba9e
refactor: pass gfx::ResizeEdge by value (#46960)
refactor: pass gfx::ResizeEdge by value

It is an enum class, so no reason to pass by reference

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-06 16:08:57 -05:00
trop[bot]
3029cdb4dd
fix: crash on macOS dialog after window-all-closed (#46952)
fix: crash on dialog after window-all-closed

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 17:29:14 +02:00
trop[bot]
6bd6180703
fix: allowed dialog file types with one filter (#46946)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 16:10:25 +02:00
Charles Kerr
7dfa2b92fb
refactor: remove some NativeWindow public API (37-x-y) (#46934)
refactor: remove some `NativeWindow` public API (#46919)

* refactor: make NativeWindow::titlebar_overlay_height_ private

* refactor: make NativeWindow::set_has_frame() protected

* refactor: remove NativeWindow::background_material()

It's only used once, in NativeWindow, so use |background_material_| directly.

* refactor: remove NativeWindow::vibrancy()

It's only used once, in a NativeWindow method, so use |vibrancy_| directly.

* refactor: unfriend api::BrowserView

It was added in Oct 2022 by 23d4a25 for access to protected NativeWindow
methods add_inspectable_view() and remove_inspectable_view().

That dependency was removed in Nov 2022 by 184ac2b, so BrowserView
doesn't need access to NativeWindow's private fields & methods anymore.

* refactor: make NativeWindow::ContentBoundsToWindowBounds() protected

refactor: make NativeWindow::WindowBoundsToContentBounds() protected
2025-05-06 09:51:08 +02:00
trop[bot]
0c683552ec
chore: bump chromium to 138.0.7160.0 (37-x-y) (#46938)
* chore: bump chromium in DEPS to 138.0.7158.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7160.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 6509206: Move Keychain UI suppression code into apple_keychain.cc

6509206

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6489036: Fix DesktopDataControlsDialog for Glic

6489036

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6506662: Reland "NavigationThrottleRunner2: content::NavigationThrottleRegistry"

6506662

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6499811: [video pip] Add live caption dialog

6499811

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6487926: Add GetMaxImageDimension function to ScreenAI service API for OCR.

6487926

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6494942: [json] Activate stringify fast-path by default

6494942

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
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-05 16:05:40 -05:00