Commit graph

29246 commits

Author SHA1 Message Date
Hailey
ac616ef41d
fix: allow NSMenuItems to be disabled (#46307)
* fix: disable NSMenu autoenable feature to allow disabling of NSMenuItems

* style: fix linter issues and update comments

* chore: remove unneeded comment
2025-03-27 17:43:46 -07:00
Charles Kerr
e09712f0e1
perf: avoid a triple-redundant map lookup in ViewsDelegate::GetAppbarAutohideEdges() (#46306)
perf: avoid a triple-redundant map lookup in ViewsDelegate::GetAppbarAutohideEdges()
2025-03-27 14:32:27 -05:00
Charles Kerr
35c90fd807
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost() (#46293)
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost()
2025-03-27 14:32:01 -05:00
Shelley Vohr
756423e81e
build: validate Chromium cookie authentication (#46274) 2025-03-27 14:29:01 -05:00
Shelley Vohr
dc61a6ab80
fix: possible crash in shell.readShortcutLink (#46294)
fix: possible crash in shell.readShortcutLink
2025-03-27 14:27:32 -05:00
Shelley Vohr
a0c859fc4f
build: roll build-images SHAs (#46291) 2025-03-27 10:39:02 +01:00
Shelley Vohr
17e38230d5
fix: crash when drag-dropping some files (#46253)
* fix: crash when drag-dropping some files

* fix: extra destination context scope
2025-03-26 17:17:23 -05:00
Charles Kerr
3ae285b614
perf: avoid std::map temporaries in WebContents::DevToolsRequestFileSystems() (#46268)
* perf: move the GetDevToolsWebContents() call outside of the loop

* perf: remove std::map temporary in WebContents::DevToolsRequestFileSystems()

* refactor: remove unused GetAddedFileSystemPaths()

* perf: remove std::vector temporary in WebContents::DevToolsRequestFileSystems()
2025-03-26 16:26:56 -05:00
Shelley Vohr
3212f60d69
fix: set userAgent on navigationHistory.restore() (#46260)
fix: set userAgent on navigationHistory restore
2025-03-26 10:59:19 -05:00
Charles Kerr
a5076a663b
perf: avoid redundant map lookup in WebContents::DevToolsIndexPath() (#46254)
perf: avoid double map lookup in WebContents::DevToolsIndexPath()
2025-03-26 10:30:02 -05:00
Shelley Vohr
d2c2261c58
fix: hard crash on invalid command line switches (#46004)
* fix: hard crash on invalid command line switch

* Update docs/api/command-line.md

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

* chore: feedback from review

* docs: Add breaking change note

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-03-26 08:14:03 -05:00
Charles Kerr
8412d78310
perf: avoid redundant map lookup in AddComponentResourceEntries() (#46255)
* perf: avoid double map lookup in ElectronComponentExtensionResourceManager::AddComponentResourceEntries()

* perf: move the path key when calling try_emplace()
2025-03-26 08:12:16 -05:00
Charles Kerr
48a38c0289
fix: build failure when printing is disabled (#46283)
fix: ftbfs when printing is disabled
2025-03-26 10:04:39 +01:00
Charles Kerr
6e44662f15
perf: avoid redundant map lookup in WebFrameMain constructor (#46238)
perf: avoid double map lookup in WebFrameMain constructor
2025-03-25 16:53:24 -05:00
Charles Kerr
c8d3184a95
refactor: migrate hashing code to new upstream crypto::hash API (#46237)
* refactor: migrate AsarFileValidator to crypto::hash

This change migrates AsarFileValidator's uses of crypto::secure_hash
to the new crypto::hash API, which has more memory safety and less
heap allocations.

Xref: 6287609

* refactor: migrate ValidateIntegrityOrDie to crypto::hash

This change migrates ValidateIntegrityOrDie's use of crypto::SHA256Hash
to the new crypto::hash API, which has more memory safety and less heap
allocations.

Xref: 6287609
2025-03-25 15:01:17 -05:00
dependabot[bot]
bb0ddcad27
build(deps): bump actions/setup-node from 4.2.0 to 4.3.0 (#46092)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](1d0ff469b7...cdca7365b2)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 13:29:22 -05:00
John Kleinschmidt
4eda76de36
build: fixup windows source cache for release (#46236)
* build: fixup windows source cache for release

* build: fixup ffmpeg gn gen

* build: add build-tools depot_tools to PATH

There are some cases where it is still expected that depot_tools be in the path

* put back regular gn gen for ffmpeg

* build: add retry to moving source cache

This resolves the error: `Move-Item : The process cannot access the file because it is being used by another process.`
2025-03-25 14:24:58 -04:00
Charles Kerr
ced8fdbce8
perf: avoid std::map temporaries in IsDevToolsFileSystemAdded() (#46230)
* refactor: extract-method GetAddedFileSystems()

* refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()

* refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()
2025-03-25 11:42:58 -05:00
Charles Kerr
f7ba0d3b4b
docs: deprecate setting ProtocolResponse.session to null (#46131)
* docs: deprecate setting ProtocolResponse.session to null

* docs: mark null ProtocolResponse.session as deprecated in struct docs

* Update docs/breaking-changes.md

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

---------

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-03-25 10:04:21 -05:00
Charles Kerr
4f4e23a3b3
perf: avoid redundant map lookups in GlobalShortcut (#46229)
* perf: avoid redundant map lookup in GlobalShortcut::OnKeyPressed()

* perf: avoid redundant map lookup in GlobalShortcut::ExecuteCommand()
2025-03-25 09:46:03 -05:00
Shelley Vohr
1d6cb348b4
fix: webContents.printToPDF() with cross-process subframes (#46218)
fix: webContents.printToPDF() with cross-process subframes
2025-03-25 08:16:47 -05:00
dependabot[bot]
8e856dfdb8
build(deps): bump github/codeql-action from 3.28.11 to 3.28.13 (#46240)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.11 to 3.28.13.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bb031afdd...1b549b9259)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 12:21:23 +01:00
John Beutner
cf82c3215f
perf: don't wait for thumbnails if they were not requested on macOS (#46138)
When using the SCK thumbnail capturer, the first refresh has the list of
sources, and the second refresh has the thumbnails. If thumbnails are
not needed, only wait for the first refresh.
2025-03-25 12:20:38 +01:00
Robo
307d4f94c7
fix: oob string read when parsing node_options (#46210)
* fix: oob string read when parsing node_options

* chore: re-enable test

* fix: missing linux server env for tests
2025-03-25 19:33:10 +09:00
dependabot[bot]
cfada0347e
build(deps): bump actions/download-artifact from 4.1.9 to 4.2.1 (#46239) 2025-03-25 08:47:33 +01:00
dependabot[bot]
7cb921369b
build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 (#46241) 2025-03-25 08:46:18 +01:00
Robo
a86e44b176
fix: NODE_OPTIONS parsing for child processes on macOS (#46209)
* fix: NODE_OPTIONS parsing for child processes on macOS

* chore: temporarily disable test

* chore: apply review feedback

* chore: fix build
2025-03-25 13:01:37 +09:00
Calvin
abaef13c0b
fix: Revert "feat: Corner Smoothing CSS rule" (#46231)
Revert "feat: Corner Smoothing CSS rule (#45185)"

This reverts commit b75e802280.
2025-03-24 20:36:49 +01:00
John Beutner
cfd64b5f89
fix: handle OnDelegatedSourceListDismissed asynchronously (#46112)
This fixes a crash with the PipeWire capturer caused by a Chromium
change introduced in
5783826.

DesktopMediaListBase now calls Refresh(true) after dispatching
DesktopMediaListObserver::OnDelegatedSourceListDismissed, so it's
important not to call DesktopCapturer::HandleFailure (which deallocates
the DesktopMediaList) synchronously from OnDelegatedSourceListDismissed.
2025-03-24 20:09:11 +01:00
John Kleinschmidt
cbcd779610
build: fixup release builds (#46228) 2025-03-24 14:34:57 -04:00
Calvin
b75e802280
feat: Corner Smoothing CSS rule (#45185)
* feat: Corner Smoothing

* Patch Blink to add CSS rule and Painting

* Add `system-ui` keyword

* Add `cornerSmoothingCSS` web preference

* Add tests

* Documentation

* fixup! Documentation

* fix: initialize smoothness value

* Use a 1.0 scale factor in tests

* Fix tests for CI

* Fix tests

* fixup! Merge branch 'main' into clavin/corner-smoothing

* Add code docs

* Document `system-ui` keyword values

* Address review comments

* fixup! Address review comments

* Address review comments

* Update patch to address upstream changes

The patch went from 694 lines to 505 lines, which is a 27.2% smaller!

* fixup! Update patch to address upstream changes
2025-03-24 11:46:12 -04:00
Shelley Vohr
9ec14b91e7
feat: add BrowserWindow.isSnapped() (#46079)
* feat: add BrowserWindow.isSnapped() on Windows

* docs: mark _Readonly_
2025-03-24 12:09:14 +01:00
Shelley Vohr
47cf4e7bfd
fix: Wayland resizing border (#46155)
* fix: Wayland resizing border

Closes https://github.com/electron/electron/issues/44543
Refs CL:5180720

Fixes an issue where the resizing border didn't work as expected on Wayland windows.

* fix: border insets when fullscreen
2025-03-24 12:08:24 +01:00
Charles Kerr
b8150f33db
refactor: remove unused weak_factory_ in electron_management_api_delegate.cc (#46200)
refactor: remove unused weak_factory_

Appears to have been added in 3745b76da but never used
2025-03-24 12:07:49 +01:00
Charles Kerr
02a4bd5942
refactor: remove unused method ProxyingWebSocket::web_request_api() (#46201)
Appears to have been added in c608d6d7 but never used
2025-03-24 10:09:24 +01:00
Charles Kerr
7ed4f0ca27
perf: use absl::flat_hash_map instead of std::unordered_map (#46202)
* perf: make ElectronUsbDelegate::controller_map_ an absl::flat_hash_map

* perf: make ElectronSerialDelegate::controller_map_ an absl::flat_hash_map

* perf: make ElectronHidDelegate::controller_map_ an absl::flat_hash_map

* perf: make FrameTreeNodeIdMap an absl::flat_hash_map

* perf: make AutofillDriverFactory::driver_map_ an absl::flat_hash_map

* perf: make asar::Archive::external_files_ an absl::flat_hash_map

* perf: make VersionIdMap an absl::flat_hash_map

* perf: make ObjectCache::proxy_map_ an absl::flat_hash_map

* docs: add TODO to investigate absl map in KeyWeakMap
2025-03-24 10:09:14 +01:00
Shelley Vohr
964090d086
fix: ensure TraverseParent bails on resource path exit (#46100)
* fix: ensure TraverseParent bails on resource path exit

* Address review changes
2025-03-24 10:06:59 +01:00
Erik Moura
e9082ea57a
docs: fix capitalization for InputEvent.modifiers (#46130) 2025-03-23 16:38:15 -05:00
Charles Kerr
5623c96dd7
refactor: remove unused field ServiceWorkerMain::weak_factory_ (#46171)
refactor: remove unused field ServiceWorkerMain::weak_factory_

Added in a467d06, appears to have never been used
2025-03-23 10:14:45 +01:00
Charles Kerr
3fd35abe98
refactor: remove unused method ElectronBrowserContext::GetWeakPtr() (#46170)
* refactor: use forward declaration of MediaDeviceIDSalt in electron_browser_context.h

* refactor: remove unused #include from browser_context.h

* refactor: remove unused ElectronBrowserContext::GetWeakPtr()

last use removed in Aug 2020 by bac2f46
2025-03-22 10:15:15 -05:00
Charles Kerr
a81e11d9de
refactor: use = default to define trivial destructors (#46165)
refactor: use '= default' to define trivial destructors
2025-03-21 16:15:34 -05:00
John Kleinschmidt
db47267be4
build: Use windows src cache (#45881)
build: use source cache on windows
2025-03-21 14:45:08 -04:00
Charles Kerr
6723bfbe32
refactor: reduce coupling in electron::api::Protocol (#46122)
* refactor: decouple api::Protocol from ElectronBrowserContext

now they do not know about each other

* refactor: make electron::api::ProtocolError private

* refactor: remove unused isolate arg in Protocol constructor

* refactor: use =default for trivial destructor
2025-03-21 07:33:25 -05:00
Shelley Vohr
603057b198
fix: remove File.path from types (#46005) 2025-03-21 08:40:49 +01:00
Shelley Vohr
9ccc63d682
fix: add missing cpp_heap to Node.js worker CreateParams (#46104) 2025-03-21 08:40:28 +01:00
LZL
4d7161f36e
feat: add ffmpeg.dll to delay load configuration (#46151)
feat: set ffmpeg.dll as a delay-loaded DLL

Updated the /DELAYLOAD linker config in BUILD.gn to set ffmpeg.dll
as a delay-loaded DLL. This reduces startup overhead and prevents unnecessary
loading when ffmpeg-related functionality is not used (e.g., the browser process
was unnecessarily loading it).
2025-03-21 16:24:34 +09:00
Shelley Vohr
32141eacfb
refactor: use upstream Widget::IsVisibleOnAllWorkspaces() (#45887)
* refactor: use upstream Widget::IsVisibleOnAllWorkspaces()

* chore: add to breaking changes
2025-03-20 23:43:47 -05:00
Charles Kerr
1b5db9989e
refactor: make URLPipeLoader private (#46113)
Move the URLPipeLoader class into an anonymous namespace in
electron_url_loader_factory.cc.
2025-03-20 15:47:47 -05:00
Charles Kerr
46967ca9c9
refactor: Add ElectronBrowserContext::BrowserContexts() (#46089)
* refactor: add ElectronBrowserContext::BrowserContexts()

* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronBrowserMainParts::PostMainMessageLoopRun()

* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::IsValidContext()

* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::BroadcastEventToRenderers()

* refactor: move PartitionKey, BrowserContextMap private

* refactor: add ElectronBrowserContext::IsValidContext()

decouple ElectronExtensionsBrowserClient from the internals of ElectronBrowserContext
2025-03-20 11:17:26 -05:00
Charles Kerr
273baf4ec2
refactor: use base::NumberToString() (#46141)
base::NumberToString() is slightly more efficient than
absl::StrFormat("%u").
2025-03-20 10:13:28 +01:00