Commit graph

3432 commits

Author SHA1 Message Date
trop[bot]
130f00dfcd
fix: fullscreen for windows without rounded corners (#47681)
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:13 +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]
9184541193
fix: accent color should reflect system settings without restart (#47658)
fix: accentColor should reflect system settings without restart

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:29 +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]
66a89ec38f
refactor: reduce scope of temporaries when getting dictionary values (#47612)
refactor: reduce scale of temporaries when getting dictionary values

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-30 12:03:45 +02:00
trop[bot]
6d3eeb46e4
perf: avoid copying a vector when calling ConvertToWeakPtrVector() (#47603)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-30 10:59:53 +02:00
trop[bot]
34dcfb5422
fix: Reland "[accessibility] Platform node lifetime cleanups" (#47610)
Reland "[accessibility] Platform node lifetime cleanups"

6462552

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-30 10:59:26 +02:00
trop[bot]
68c769de94
refactor: avoid copies of large objects in range based for loops (#47606)
* Avoid copies of large objects in range-based for-loops.

Xref: 6527689

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

* Avoid copies of large objects in range-based for-loops in Browser::ShowAboutPanel()

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-30 10:28:53 +02:00
trop[bot]
9c0ef6f9c6
refactor: sync IsKillURL() with upstream impl in extension_tab_util.cc (#47596)
Use base::MakeFixedFlatSet()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-27 21:07:44 -05:00
trop[bot]
c150a1e004
refactor: extract-constant static Windows registry keys in Browser code (#47589)
* refactor: extract-constant for registry key in GetProcessExecPath()

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

* refactor: extract-constant for registry key in Browser::SetLoginItemSettings()

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

* refactor: extract-constant for registry key in Browser::SetLoginItemSettings()

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

* refactor: extract-constant for registry key in Browser::GetLoginItemSettings()

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

* chore: document the symbolic constants

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

* refactor: prefer base::wcstring_view::c_str() to data() to make zero-termination clearer

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-27 15:12:00 -05: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
Shelley Vohr
3e8e87d186
feat: support customizing window accent color on Windows (#47285) 2025-06-24 14:43:02 +02:00
Shelley Vohr
93d5152a25
fix: chrome://accessibility loading correctly (#47497)
fix: chrome://accessibility loading correctly
2025-06-23 14:38:29 +02:00
Charles Kerr
bb22eaccec
refactor: simplify titlebar overlay initialization (#47480) 2025-06-23 11:24:05 +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
Shelley Vohr
2ad762e075
feat: support HIDDevice.collections (#47391)
* feat: support HIDDevice.collections

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

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

---------

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-06-16 15:56:08 -04: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
3c9b8475a2
refactor: move gin::Converter<PreloadScript> impl to a .cc file (#47445)
refactor: move gin::Converter<PreloadScript> impl to a .cc file
2025-06-13 10:15:32 +02: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
electron-roller[bot]
53fd879043
chore: bump chromium to 138.0.7190.0 (main) (#47107)
* chore: bump chromium in DEPS to 138.0.7180.0

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

Refs 6546797

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

Refs 6548078

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

Refs 6544950

* chore: bump chromium in DEPS to 138.0.7181.0

* chore: update patches

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

* chore: bump DEPS to 138.0.7183.0

* 6553142: Remove SelectFileDialogLinuxKde | 6553142

* chore: update patches

* 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.7190.0

* chore: update patches

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

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

* fix: remove pdf_extension_util::AddAdditionalData
4099130

This was removed 2 years ago in Chrome.

* fix: provide BrowserContext to pdf_extension_util::AddAdditionalData
6558173

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

* fix: pass in navigation throttle registry
6536175

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

This partially reverts commit 20d709dd15ba0ff332e24ee314149d642dc5d47c.

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

* Update corner smoothing expected images

* 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.

* 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: 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>
2025-06-03 11:19:20 -04: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
Robo
5ccbfa2faf
fix: regression with directory selection in macOS dialogs (#47259) 2025-05-27 19:08:11 +09:00
Shelley Vohr
f89c2a0ef4
fix: titlebar showing in content protected window (#47241)
Closes https://github.com/electron/electron/issues/47152.
2025-05-26 09:46:04 +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
2248de847d
refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop() (#47201)
refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop()
2025-05-22 18:20:39 -05:00
Charles Kerr
38e7ff944e
refactor: make NativeWindow::has_frame_ const (#47200)
* refactor: make NativeWindow::is_modal_ const

* refactor: make NativeWindow::title_bar_style_ const and private

* refactor: make NativeWindow::has_client_frame() protected

refactor: make NativeWindow::transparent() protected

* refactor: make NativeWindow::enable_larger_than_screen() protected

* refactor: make NativeWindow::has_frame_ const

* fixup! refactor: make NativeWindow::has_client_frame() protected

fix: GetExpandedWindowSize()
2025-05-22 17:32:46 -05: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
Charles Kerr
4af0c5d762
refactor: make NativeWindow::transparent_ const (#47172)
* refactor: use in-class member initialization for NativeWindow::widget_

* refactor: make NativeWindow::transparent_ const

refactor: make NativeWindow::enable_larger_than_screen_ const

* chore: make linter happy after rebase
2025-05-21 19:42:08 +02:00
Charles Kerr
a7a3e10300
refactor: prefer base::circular_deque over std::deque (#47171)
* refactor: use base::circular_deque in ResolveProxyHelper

* 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.
2025-05-21 12:04:36 -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
d6638f9564
refactor: make NativeWindow::pending_transitions_ a base::queue (#47157)
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."
2025-05-20 17:35:51 -05:00
Charles Kerr
9f8bcc4d98
refactor: make NativeWindow::has_client_frame_ const (#47156) 2025-05-20 17:14:28 -05:00
Charles Kerr
21155679a0
refactor: add NativeWindowViews::GetClientFrameViewLinux() (#47130)
* refactor: add NativeWindowViews::GetClientFrameViewLinux()

* chore: clarify code comment
2025-05-20 14:15:06 -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
Shelley Vohr
296e39456a
refactor: match upstream macOS a11y handling (#47144) 2025-05-20 11:06:57 -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
Charles Kerr
208bbc0504
refactor: add NativeWindow::SetShape() (#47131)
use NativeWindow::SetShape() in api::BaseWindow
2025-05-19 10:29:29 +02: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
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