Commit graph

1176 commits

Author SHA1 Message Date
trop[bot]
0b77096f2a
fix: default to system accent color on invalid user color (#47684)
fix: default to system accent color on invalid user color"

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-07-08 15:21:44 +02:00
trop[bot]
3a6d7e0c22
refactor: avoid a few unnecessary strings (#47655)
* perf: replace string temporary with string_view in GetXdgAppId()

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

* perf: replace string temporary with string_view in ToV8(WindowOpenDisposition)

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

* perf: replace string temporary with string_view in ToV8(electron::api::WebContents::Type)

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-07-04 10:58:50 +02:00
trop[bot]
a425ddd08e
fix: crash on source capture with empty thumbnail size (#47652)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-07-03 22:19:43 +02:00
trop[bot]
c65bfc1e5c
chore: bump chromium to 140.0.7261.0 (38-x-y) (#47617)
* chore: bump chromium in DEPS to 140.0.7259.0

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

* chore: update patches

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

* Add fade in animation to Picture-in-Picture windows

6538268

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

* Use V8 Apis that don't return JSGlobalObject

Refs https://issues.chromium.org/issues/333672197

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

* chore: IWYU

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

* chore: bump chromium in DEPS to 140.0.7261.0

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

* chore: update patches

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

* revert: update to siso-chromium image

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

* Use v8::Object::WrapGlobal()

Refs 6650977

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

* chore: IWYU

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

* chore: fix --trace-startup spec

Co-authored-by: deepak1556 <hop2deep@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: deepak1556 <hop2deep@gmail.com>
2025-06-30 17:07:00 -04:00
trop[bot]
85a8bfaa31
chore: bump chromium to 139.0.7256.0 (38-x-y) (#47615)
* chore: bump chromium in DEPS to 139.0.7242.0

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

* chore: update render_widget_host_view_mac.patch

no code changes; just updating patch context

Do a cleanup pass on the history swiper code | 6604367

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

* chore: update mas_avoid_private_macos_api_usage.patch.patch

no code changes; just updating patch context

[tracing] Delete base/trace_event/base_tracing.h | 6624012

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

* chore: update chore_provide_iswebcontentscreationoverridden_with_full_params.patch

no manual changes; just updating patch context

[ActorFramework] Refactor Actor Task Management | 6618684

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

* chore: update fix_move_autopipsettingshelper_behind_branding_buildflag.patch

[pip] Tuck picture-in-picture windows when a file dialog is open | 6449682

Reland "[document pip] Restrict the size that a website can request" | 6372104

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

* chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch

Xref: corner-shape: constraint radii based on opposite corner overlap | 6592572

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

* chore: update revert_code_health_clean_up_stale_macwebcontentsocclusion.patch

no manual changes; just updating patch context

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

* chore: update fix_rename_sqlite_win32_exports_to_avoid_conflicts_with_node_js.patch

no code changes; just updating patch context

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

* chore: e patches all

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

* Plumb Verify2QwacBinding and hook it up in QwacWebContentsObserver

6624719

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

* Remove host delegate OnMainFrameCreatedForBackgroundPage

6631123

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

* Extensions: Rename GetResourceURL to ResolveExtensionURL

6625053

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

* Consolidate NativeFrameViewMac

6614239

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

* ICWYU

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

* Remove dead code WidgetAXTreeIDMap

6619701

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

* Reland "extensions: Add `WillPrepareForEvaluation` to setup MojoJS"

6630056

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

* NavigationThrottleRunner2: Remove MaybeAddThrottle

6628079

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

* Tuck picture-in-picture windows when a file dialog is open

6449682

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

* build: fix snapshot_blob.bin build error

xref: https://issues.chromium.org/issues/416540976

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

* chore: e patches all

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

* build: freeup disk space on macos

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

* chore: bump chromium in DEPS to 139.0.7244.0

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

* chore: update printing.patch

no manual changes; just updating patch context

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

* chore: remove upstreamed ignore_parse_errors_for_resolveshortcutproperties.patch

Prevent Windows crash on unexpected shortcut type | 6633298

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

* chore: e patches all

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

* Revert "Reland "extensions: Add `WillPrepareForEvaluation` to setup MojoJS""

This reverts commit 77c4f967a637f7e8970114f91311f9fddede0f7c.

Revert CL for the high confidence crash culprit for http://crash/28f897bb9743dfe0 | 6641819

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

* Fix spec's expected base64-encoded PNG strings to match upstream changes.

[rust png] Enable by default. | 6085801

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

* chore: bump chromium in DEPS to 139.0.7246.0

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

* chore: e patches all

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

* chore: bump chromium in DEPS to 139.0.7248.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>

* siso: Enable Siso by default for non-Google builds

6638830

Disabling for now until we are ready to build siso on all platforms.

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

* Revert "revert Don't use static variable for UseExternalPopupMenus"

This reverts commit e91e3894e6c34cc0ffe69ed45417c0ebec882fb1.

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

* Update mac_sdk_min to match minimum required SDK version

6493969
(cherry picked from commit 3e7cbe912d8fe1062d68ed06968aaee22013985f)

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

* Use default window styling on Mac

6648665

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

* Reland "Force the unintentional renderer process creation check by default"

6626905

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

* fixup: Reland "Force the unintentional renderer process creation check by default

6626905

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

* chore: bump chromium in DEPS to 139.0.7249.0

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

* fixup: Reland "Force the unintentional renderer process creation check by default

6626905

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

* chore: update patches

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

* chore: bump chromium in DEPS to 139.0.7250.0

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

* chore: bump chromium in DEPS to 139.0.7252.0

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

* chore: bump chromium in DEPS to 139.0.7254.0

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

* 6638187: browser level TOCTOU check for coordinate target

6638187

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

* chore: fixup patch indices

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

* chore: add missing base/notimplemented includes

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

* 6652910: [Frame Cleanup] Push down/hide implementation-specific API

6652910

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

* chore: bump chromium in DEPS to 139.0.7256.0

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

* chore: fix lint

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

* fixup! 6652910: [Frame Cleanup] Push down/hide implementation-specific API

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

* fix: move HandleScope location

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

* chore: bump chromium in DEPS to 139.0.7258.0

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

* fixup! [NonClientFrameView] Consolidate NativeFrameViewMac

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

* Revert "chore: bump chromium in DEPS to 139.0.7258.0"

This reverts commit 264b2e934f4b2705c47d9761010052b95d9dd5de.

Co-authored-by: deepak1556 <hop2deep@gmail.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: Charles Kerr <charles@charleskerr.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-06-30 12:29:54 -04:00
trop[bot]
4268bf91e4
refactor: remove stray .c_str() calls for absl::StrFormat() (#47578)
refactor: remove stray .c_str() calls for absl::StrFormat()

StrFormat() understands std::string, std::string_view

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-26 11:41:48 -05:00
Shelley Vohr
51fbc964a6
fix: ensure /dev/null fd is closed on failure (#47525)
* fix: ensure /dev/null fd is closed on failure

* chore: ignore closehandle for windows

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-06-24 17:44:50 +02:00
Keeley Hammond
3536d4976a
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 16:41:19 -07:00
electron-roller[bot]
6779769d22
chore: bump chromium to 139.0.7219.0 (main) (#47348)
* chore: bump chromium in DEPS to 139.0.7205.0

* 6543986: Mac: decouple deserializing and applying sandbox policy

Refs 6543986

* 6580079: Reland 'Remove the third-party blocking feature'
Refs 6580079

* 6505716: guest-contents: Add components/guest_contents
Refs 6505716

* 6572556: Move LogMessageManager out of gpu_service_impl.cc.
Refs 6572556

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

* 6550237: Rename ReconnectEventObserver to ConnectionChangeObserverClient
Refs 6550237

* 6565918: Validate path is valid UTF8 in SelectFileDialogLinuxPortal
Refs 6565918

* 6579713: Remove base::NotFatalUntil::M130 usage
6566111: Change UtilityProcessHost to manage its instance internally
Refs
6579713
6566111

* chore: update chromium patches

* chore: update remaining patches

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

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

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

* [PDF Ink Signatures] Support PdfAnnotationsEnabled policy
6558970

* build: disable libcxx modules for rbe

* chore: bump chromium in DEPS to 139.0.7217.0

* chore: bump chromium in DEPS to 139.0.7218.0

* chore: update patches

fix_use_delegated_generic_capturer_when_available.patch was updated to handle a small change:
6582142: Use content::Create*Capturer in DesktopCaptureDevice. | 6582142

* chore: bump chromium in DEPS to 139.0.7219.0

* chore: update patches

* 6594615: Change Chromium's deployment target to macOS 12
6594615

Updated the assertion message to match the docs structure now too. I removed the callout to the supported versions doc because it has moved and doesn't contain minimum platform version information.

* 6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_
6606232

|NativeWindow::GetContentMinimumSize| and |NativeWindow::GetContentMaximumSize| may be good opportunities for a refactor now.

* add squirrel.mac patch for removed function

This was triggered by the macOS 12.0 deployment upgrade change.

See: https://developer.apple.com/documentation/coreservices/1444079-uttypeconformsto?language=objc

* 6582142: Use content::Create*Capturer in DesktopCaptureDevice.
6582142

* 6579732: Two minor API "quality of life" cleanups in OSCrypt Async
6579732

* chore: add include for base::SingleThreadTaskRunner

Not sure what change caused this, I expect it would be a removed include somewhere else, but it's likely not important to track down.

* chore: update libcxx filenames

* chore: update CI build-tools commit target for macOS SDK 15.4

The following change uses an API that was added in the macOS 15.4 SDK. Support for that SDK version was added later than the current build-tools commit target.

6575804: Use a quick-and-dirty solution to avoid glitching with paste-and-go | 6575804

See: https://developer.apple.com/documentation/appkit/nspasteboard/accessbehavior-swift.enum?language=objc

* fixup! 6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_ 6606232

* chore: bump chromium in DEPS to 139.0.7220.0

* chore: update patches

Minor changes due to:

6613978: pwa: let events fall through in the transparent area of TopContainerView | 6613978
6614778: Refactor auto pip tab observer for Android support | 6614778

* 6543986: Mac: decouple deserializing and applying sandbox policy
6543986

The DecodeVarInt and DecodeString functions look benign from a MAS perspective. I suspect they were patched out to avoid "unused function" errors. Their complements for encoding are unpatched, supporting this idea.

The code that uses these functions was refactored out of the section that we patch out. Instead of patching out that new function, I decided to treat it the same as the serialization function that is unpatched.

* chore: bump chromium in DEPS to 139.0.7222.0

* chore: bump chromium in DEPS to 139.0.7224.0

* chore: bump chromium in DEPS to 139.0.7226.0

* chore: bump chromium in DEPS to 139.0.7228.0

* chore: update patches

* Don't use static variable for UseExternalPopupMenus

6534657

* Reland "Roll libc++ from a01c02c9d4ac to a9cc573e7c59

6607589

* chore: bump chromium in DEPS to 139.0.7219.0

* chore: update patches

* revert Don't use static variable for UseExternalPopupMenus

* tls: remove deprecated tls.createSecurePair and SecurePair

https://github.com/nodejs/node/pull/57361

* Revert "Reland "Roll libc++ from a01c02c9d4ac to a9cc573e7c59"

This reverts commit 33e1436a0c598ffa8cd308d08de481ed9cd22168.

* test: cleanup api-desktop-capturer-spec.ts

* test: more cleanup of api-desktop-capturer-spec.ts

* chore: debug dcheck error in webrtc on linux

* fixup patch

* add debugging to desktop capturer spec

* test: fixup api-desktop-capturer-spec.ts for linux

* chore: remove debugging patch

* Revert "fixup! 6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_ 6606232"

This reverts commit 32e75651c14512572d322e819c98ab1469663bb6.

* Revert "6606232: [views] Remove DesktopWindowTreeHostWin::window_enlargement_"

This reverts commit 89c51aa1c7771fd7f1d634486bc77f493f1d2ea9.

* [views] Remove DesktopWindowTreeHostWin::window_enlargement_

6606232

Reverting as we need this functionality for now.

* fixup: remove patch that was accidentally added back

---------

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: deepak1556 <hop2deep@gmail.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-16 12:46:06 -05:00
Charles Kerr
6f915e85e2
refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath> (#47428)
* refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>

* fixup! refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>
2025-06-12 12:25:40 +02:00
Shelley Vohr
38fe14041d
fix: crash calling Fetch.continueResponse with WebContentsView (#47434)
fix: crash calling Fetch.continueResponse with WebContentsView
2025-06-11 15:43:47 +02:00
Shelley Vohr
06bc59be88
fix: rework lifetime mgmt of ClearDataTask/ClearDataOperation (#47361)
* fix: rework lifetime mgmt of ClearDataTask/ClearDataOperation

* Update shell/browser/api/electron_api_session.cc

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

* Update shell/browser/api/electron_api_session.cc

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

* Update shell/browser/api/electron_api_session.cc

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

* Update shell/browser/api/electron_api_session.cc

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

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-06-07 08:00:30 +02:00
Shelley Vohr
09a0926c5b
fix: printing PDF via webContents.print() (#47377)
fix: printing PDF via webContents.print()
2025-06-06 14:20:37 -04:00
Shelley Vohr
fbb3fa7503
feat: allow intercepting mouse events (#47280)
* feat: allow intercepting mouse events

* test: add specs

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

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

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-06-04 14:10:33 +02:00
Sta Zhu
158176f0f3
fix: addChildView() crashes when adding a closed WebContentsView (#47099)
fix: addChildView() crashes when add a closed WebContentsView
2025-06-03 10:53:25 +02:00
Shelley Vohr
c84e8c6c22
feat: expose win.isContentProtected() (#47242)
* feat: expose win.isContentProtected()

* chore: remove stray _isContentProtected
2025-05-30 11:00:13 +02:00
Shelley Vohr
c6f368acc6
chore: debug crash on DevTools SetOwnerWindow (#47243) 2025-05-26 09:45:43 +02:00
Gellert Hegyi
b9b96a96f7
feat: add menu item role palette and header (#45538)
* feat: add menu item role `palette` and `header`

* adds comments

* refactors new role items to new item types

* docs: custom type

* docs: note types only available on mac 14+

---------

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-05-23 12:43:49 -04:00
Charles Kerr
2e8fc17f07
refactor: pass views::Widget* into constructors of our TreeHosts and NativeWidgets (#47177)
* refactor: remove unnecessary downcast in MenuViews::PopupAt()

* refactor: pass a views::Widget as an arg to the ElectronDesktopWindowTreeHostLinux ctor

* refactor: pass a views::Widget as an arg to the ElectronDesktopNativeWidgetAura ctor

* refactor: pass a views::Widget as an arg to the ElectronDesktopWindowTreeHostWin ctor

* refactor: create desktop_window_tree_host_ in the ElectronDesktopNativeWidgetAura constructor

* fixup! refactor: create desktop_window_tree_host_ in the ElectronDesktopNativeWidgetAura constructor

fix: tyop
2025-05-21 16:02:55 -05:00
Shelley Vohr
7b77a24211
fix: remove extra 'suspend'/'resume' handling from powerMonitor (#47162)
fix: remove extra 'suspend'/'resume' handling from powerMonitor
2025-05-21 10:00:38 -05:00
Charles Kerr
211faed848
refactor: add NativeWindow::IsActive() (#47148)
this was already present on macOS; use in NativeWindowViews too
2025-05-20 11:08:44 -04: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
Charles Kerr
208bbc0504
refactor: add NativeWindow::SetShape() (#47131)
use NativeWindow::SetShape() in api::BaseWindow
2025-05-19 10:29:29 +02: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
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
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
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
8308ac29c8
refactor: pass gfx::ResizeEdge by value (#46935)
refactor: pass gfx::ResizeEdge by value

It is an enum class, so no reason to pass by reference
2025-05-06 11:57:53 -05:00
Charles Kerr
2e2776611f
refactor: simplify NativeWindow::FullScreenTransitionState (#46918)
* refactor: make NativeWindow::fullscreen_transition_state_ private

* refactor: add NativeWindow::is_transitioning_fullscreen() helper

* refactor: remove unused NativeWindow::fullscreen_transition_state()

* refactor: replace NativeWindow::set_fullscreen_transition_state() with NativeWindow::set_is_transitioning_fullscreen()

refactor: remove unused NativeWindow::FullScreenTransitionState
2025-05-05 09:28:29 -05:00
Charles Kerr
1f4f1b4afc
refactor: add NativeWindow::FromWidget() helper (#46917)
refactor: add NativeWindow::FromWidet() helper

refactor: make kElectronNativeWindowKey a protected field
2025-05-05 09:27:41 -05:00
Charles Kerr
3faddd5ae2
refactor: move IsClosed() and IsClosable() tests into NativeWindow::Close() (#46888)
refactor: devirtualize NativeWindow::IsClosed()
2025-05-02 13:21:29 -05:00
Charles Kerr
f6b297a06a
refactor: use base::ObserverList::Notify() (#46875)
* refactor: use ObserverList::Notify() in shell/browser/window_list.cc

* refactor: use ObserverList::Notify() in shell/browser/web_contents_zoom_controller.cc

* refactor: use ObserverList::Notify() in shell/browser/usb/usb_chooser_context.cc

* refactor: use ObserverList::Notify() in shell/browser/usb/electron_usb_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/ui/views/menu_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/ui/tray_icon.cc

* refactor: use ObserverList::Notify() in shell/browser/ui/electron_menu_model.cc

* refactor: use ObserverList::Notify() in shell/browser/serial/serial_chooser_context.cc

* refactor: use ObserverList::Notify() in shell/browser/native_window.cc

* refactor: use ObserverList::Notify() in shell/browser/serial/electron_serial_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/browser.cc

* refactor: use ObserverList::Notify() in shell/browser/api/electron_api_web_contents.cc

* refactor: use ObserverList::Notify() in shell/browser/hid/electron_hid_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/hid/hid_chooser_context.cc
2025-05-02 11:10:52 +02:00
Shelley Vohr
ede84fc327
feat: support dip <-> screen conversion on Linux X11 (#46211)
feat: support dip <-> screen conversion on Linux
2025-05-02 10:31:45 +02:00
electron-roller[bot]
2b07e6450c
chore: bump chromium to 138.0.7154.0 (main) (#46872)
* chore: bump chromium in DEPS to 138.0.7152.0

* chore: update patches

* chore: bump chromium in DEPS to 138.0.7154.0

* chore: update patches

* ozone/wayland: Fix bookmark dropdown right click context menu

6488801

* Use base::cstring_view in base::Environment

6494292

* [A11yPerformance] Remove Add/Remove AXMode methods

6418444

xref: 6383275

* build: update filenames.libcxx.gni

* Use base::cstring_view in base::Environment

6494292

* Use getters to expose NativePixmapHandle from GpuMemoryBufferHandle

6374406

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-01 23:53:40 -05:00
David Sanders
4f89c31956
refactor: add EmitDeprecationWarning helper (#46860)
* refactor: add EmitDeprecationWarning helper

Also switches EmitWarning to using Node's ProcessEmitWarningGeneric

* chore: use node namespace for function call
2025-04-30 13:48:35 -05:00
Charles Kerr
450b2d0ba3
refactor: remove public method BrowserWindow::GetWeakPtr() (#46763)
refactor: remove public method electron::api::BrowserWindow::GetWeakPtr()
2025-04-25 15:01:52 -05:00
Charles Kerr
74c4ae0b55
refactor: use net::CanonicalCookie::IsDomainMatch() (#46748)
* refactor: use net::CanonicalCookie::IsDomainMatch()

Previously we had been rolling our own impl

* test: add pattern-matching tests for our cookie API
2025-04-25 16:08:16 +02:00
Charles Kerr
06a99d6770
refactor: make node Buffers more friendly to base::span / std::span (#46724)
* refactor: add electron::Buffer namespace; move the Buffer as_byte_span() into it

* feat: add electron::Buffer::Copy()

a span-friendly version of node::Buffer::Copy()

* refactor: use electron::Buffer::Copy() in electron_api_base_window.cc

* refactor: use electron::Buffer::Copy() in electron_api_data_pipe_holder.cc

* refactor: use electron::Buffer::Copy() in electron_api_safe_storage.cc

* refactor: use electron::Buffer::Copy() in electron_api_clipboard.cc

* refactor: use electron::Buffer::Copy() in osr_converter.cc

* refactor: use electron::Buffer::Copy() in electron_api_native_image.cc

* refactor: use electron::Buffer::Copy() in net_converter.cc

* refactor: use electron::Buffer::Copy() in electron_api_web_contents.cc

* refactor: make NewEmptyBuffer() return a Local<Value>
2025-04-25 08:00:09 -05:00
Shelley Vohr
1976e935e7
fix: missing HandleScope in RemoveFromParentChildWindows (#46758) 2025-04-25 14:04:25 +02:00
wujinli
3e78bbde6a
fix: crash when renderer process crashes while webview is reloading (#46735)
WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl
and triggers a fatal NOTREACHED.
2025-04-25 10:10:27 +02:00
Charles Kerr
e9f279afd1
chore: remove WebContents.getNativeView() (#46734)
chore: remove never-used WebContents.getNativeView().

This was added in https://github.com/electron/electron/pull/10308 but
was never used and never documented, not even as experimental API.
2025-04-23 20:33:50 -05:00
Charles Kerr
c7b0bdab7e
fix: explicitly call GetNativeNSView() on macOS (#46733)
* fix: explicitly call GetNativeNSView() on macOS

* chore: move macOS impl to a .mm file

This is needed in order to access gfx::NativeView::GetNativeNSView()
2025-04-23 17:55:18 -05:00
electron-roller[bot]
dd03cceda0
chore: bump chromium to 137.0.7128.1 (main) (#46482)
* chore: bump chromium in DEPS to 137.0.7107.0

* chore: bump chromium in DEPS to 137.0.7109.0

* chore: bump chromium in DEPS to 137.0.7111.0

* chore: bump chromium in DEPS to 137.0.7113.0

* 6384240: Remove double-declaration for accessibility on macOS | 6384240

* 6422872: Remove unused includes in isolation_info_mojom_traits.h | 6422872

* chore: update patches

* 6400733: Avoid ipc_message_macros.h usage in some foo_param_traits_macros.h files | 6400733

* chore: update patches

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

* chore: iwyu

* refactor: prefer value initialization over memset()

From the looks up upstream commits in base/, it looks like memset()
could trigger `-Wunsafe-buffer-usage` warnings soon?

Value initialization is more C++ish and less error-prone anyway,
due to memset()'s easily swappable parameters.

* refactor: NotifyIcon::InitIconData() returns a NOTIFYICONDATA

This follows F.20 in the C++ Core Guidelines and also removes the need
for memset()

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- strcmp()

* fixup!  6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

* 6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | 6433203

* chore: bump chromium in DEPS to 137.0.7115.0

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* chore: update patches

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* fix: add pragma for MacSDK unsafe buffers | 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

* chore: bump chromium in DEPS to 137.0.7117.0

* chore: update patches

* chore: update filesnames.libcxx.gni

* 6431756: Replace SetOwnedByWidget() bool arg with a PassKey. | 6431756

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* 6428345: Remove ExtensionService usage from ChromeExtensionRegistrarDelegate | 6428345

* 6384315: Migrate extensions_enabled from ExtensionService to Registrar | 6384315

* 6428749: [extensions] Refactor ExtensionService for AddNewAndUpdateExtension. | 6428749

* chore: bump chromium in DEPS to 137.0.7119.0

* 6440290: corner-shape: support inset shadow | 6440290

* 6429230: FSA: Move blocked paths to the PermissionContext class | 6429230

* chore: update patches

* chore: bump chromium in DEPS to 137.0.7121.0

* chore: update patches

* fix: partially revert 6443473: Remove ItemDelete from the Mac version of AppleKeychain | 6443473

* fix: update filenames.libcxx.gni

* chore: bump chromium in DEPS to 137.0.7123.0

* chore: update patches

* chore: "grandfather in" electron views too

Lock further access to View::set_owned_by_client() | 6448510

* chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch

corner-shape: support inset shadow | 6440290

* refactor: grandfather in AutofillPopupView as a subclass of WidgetDelegateView

Add a PassKey for std::make_unique<WidgetDelegateView>() | 6442265

* Provide dbus appmenu information on Wayland | 6405535

* [extensions] Move OnExtensionInstalled out of ExtensionService. | 6443325

* refactor: grandfather in NativeWindowViews for delete callbacks

6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | 6433203

* chore: merge the four "grandfather" patches into one

* [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386: [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386

NB: the changes here are copied from the upstream changes in
chrome/browser/ui/webui/accessibility/accessibility_ui.cc

* 6420753: [PermissionOptions] Use PermissionDescriptorPtr in PermissionController | 6420753

* 6429573: [accessibility] Move mode change out of AccessibilityNotificationWaiter | 6429573

* chore: e patches all

* 6419936: [win] Change ScreenWin public static methods to virtual | 6419936

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- fprintf()
- fputs()
- snprintf()
- vsnprintf()

* fix: size conversion FTBFS on Win

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- wcscpy_s()

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- wcsncpy_s()

* chore: update mas_avoid_private_macos_api_usage.patch.patch

6394283: Remove double-declaration for accessibility on iOS | 6394283

Lots of context shear in this commit but the only interesting part is:

-+  return nullptr;
++  return {};

Which is needed because the return type is sometimes not a pointer.

* chore: e patches all

* chore: disable -Wmacro-redefined warning in electron_main_win.cc

* chore: bump chromium in DEPS to 137.0.7123.5

* refactor: patch electron PermissionTypes into blink

6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* chore: e patches all

* chore: remove the box_painter_base.cc part of feat_corner_smoothing_css_rule_and_blink_painting.patch

as per code review @ https://github.com/electron/electron/pull/46482#pullrequestreview-2777338370

* test: enable window-smaller-than-64x64 test on Linux

* chore: bump chromium in DEPS to 137.0.7124.1

* chore: bump chromium in DEPS to 137.0.7125.1

* chore: bump chromium in DEPS to 137.0.7127.3

* 6459201: [Extensions] Remove ExtensionSystem::FinishDelayedInstallationIfReady() | 6459201

* 6454796: [Extensions] Move (most) registrar delayed install logic to //extensions | 6454796

* chore: bump chromium in DEPS to 137.0.7128.1

* chore: e patches all

* chore: node ./script/gen-libc++-filenames.js

* [views] Gate DesktopWindowTreeHostWin::window_enlargement_ behind flag

Refs 6428649

* feat: allow opt-out animated_content_sampler.

Refs 6438681

* Trigger CI

---------

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: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-04-22 15:53:29 -04:00
Charles Kerr
7083419361
refactor: make electron::api::BaseWindow fields private (#46689)
refactor: make electron::api::BaseWindow fields private
2025-04-22 10:19:11 +02:00
Calvin
f15fa56e38
refactor: reduce & remove no-op MicrotasksScope calls (#46681)
* fix: do not run microtasks in V8Serializer in browser process

* Remove no-op MicrotasksScope in `shell/browser/api/electron_api_auto_updater.cc`

This call was added in https://github.com/electron/electron/pull/40576 as an expansion of `gin_helper::EmitEvent`.

Since this only runs in the browser process and `bool ignore_browser_checkpoint = true` this code is a no-op.

Node should perform a microtask checkpoint if necessary in `node::MakeCallback`.

* Remove no-op MicrotasksScope in `shell/common/api/electron_bindings.cc`

This method is only called by the browser process. The containing function, `ElectronBindings::DidReceiveMemoryDump`, is only used in two places:

* `ElectronBindings::GetProcessMemoryInfo` in the same file, which has a `CHECK` that it's running in the browser process at the top.
* From `shell/browser/api/electron_api_web_contents.cc`, which is only run in the browser process.

Added a DCHECK for clarity and validation.

* Replace `gin_helper::MicrotasksScope` with `v8::MicrotasksScope` in `shell/renderer/`

The browser check is unnecessary in the renderer. Since `gin_helper::MicrotasksScope` will always act exactly like `v8::MicrotasksScope`, it's clear to just use the v8 object directly. This also brings them in line with the many other uses of `v8::MicrotasksScope` in `shell/renderer/`.
2025-04-19 12:18:03 -05:00
Shelley Vohr
352a403efd
fix: postMessage crash with invalid transferrable (#46639) 2025-04-17 15:09:48 +02:00
Shelley Vohr
51bffb533e
fix: paint and flash issues on macOS (#46615)
* fix: paint and flash issues on macOS

* Adhere to paintWhenInitiallyHidden
2025-04-14 16:29:07 +02:00
Keeley Hammond
a9b2ec514b
fix: fallback to old MacOS context menu behavior if no frame is present (#46595)
* fix: fallback to old MacOS context menu behavior if no frame is present

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

* docs: add additional option for focusedFrame

* fix: handle frame found, but no view update from rfh

* fix: fix conditional

Co-authored-by: Calvin <clavin@users.noreply.github.com>

---------

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
2025-04-11 10:15:35 -04:00
Shelley Vohr
3064b24c9d
refactor: use default printing path when no user options (#46587) 2025-04-11 10:14:29 -04:00
Shelley Vohr
446d0769ed
feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46438)
feat: expose shouldUseDarkColorsForSystemIntegratedUI

Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.

This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.
2025-04-10 12:08:29 +02:00