Commit graph

28819 commits

Author SHA1 Message Date
Charles Kerr
493e3c4537
fix: don't use deprecated ui::MouseEvent constructor (#44868)
* refactor: do not use deprecated gfx::Point constructor for MouseEvent

Deprecated in https://chromium-review.googlesource.com/c/1444251

* refactor: use WebInputEvent::GetTypeAsUiEventType() instead of rolling our own

Added in https://chromium-review.googlesource.com/c/chromium/src/+/2180291
2024-12-02 11:13:38 -05:00
Charles Kerr
b2ce5296af
fix: remove unused id argument from TranslateToStock() (#44900)
unused since fb537d91fc
2024-12-01 16:34:48 -06:00
illusory-dream
4e40b49d1a
docs: fix a syntax issue in document breaking changes (#44841)
fix: syntax issue in docs
2024-11-30 21:44:33 -08:00
Niklas Wenzel
d8149aa376
docs: specify default value for respondToAuthRequestsFromMainProcess (#44855)
docs: specify default value for respondToAuthRequestsFromMainProcess
2024-11-30 21:33:33 -08:00
Charles Kerr
033a0abb59
refactor: reduce scope of relauncher's internal constants (#44860)
* refactor: make kRelauncherArgSeparator private to relauncher.cc

* refactor: make kRelauncherTypeArg private to relauncher.cc

* refactor: remove unused type relauncher::CharType

* refactor: move private constants into standalone private namespace

* refactor: move kWaitEventName into the only function that uses it
2024-11-30 06:54:40 -06:00
Shelley Vohr
8f00cc9c0e
build: remove context-aware patch (#44862) 2024-11-29 11:45:33 -06:00
Charles Kerr
f7e823ac80
refactor: return-braced-init-list pt 2 of 2 (#44870)
* refactor: more return-braced-init-list, this time for v8 and gin objects

* refactor: more return-braced-init-list, this time for v8, gin, std, and base objects
2024-11-29 11:44:33 -06:00
Charles Kerr
4a695d07c6
fix: misc-use-internal-linkage warnings (#44843)
* refactor: misc-use-internal-linkage warnings in context bridge

move impl functions into anonymous namespace so that they're not visible
to other compilation units:

- ExposeAPIInWorld()
- IsCalledFromMainWorld()
- OverrideGlobalPropertyFromIsolatedWorld()
- OverrideGlobalValueFromIsolatedWorld()
- TraceKeyPath()

* refactor: misc-use-internal-linkage warnings in skia util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- struct ScaleFactorPair
- kScaleFactorPairs[]
- GetScaleFactorFromPath()
- AddImageSkiaRepFromPath()

* refactor: misc-use-internal-linkage warnings in printing util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetFullPagePlugin()

* refactor: misc-use-internal-linkage warnings in blijnk converter

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetKeyLocationCode()
- ModifiersToArray()

* refactor: misc-use-internal-linkage warnings in extrension system

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- ParseManifest()

* refactor: misc-use-internal-linkage warnings in skia util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetFrameTokenMap()
- GetFrameTreeNodeIdMap()

* refactor: misc-use-internal-linkage warnings in electron_api_utility_process.cc

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetAllUtilityProcessWrappers()

* refactor: misc-use-internal-linkage warnings in electron_api_menu

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- InvokeBoolMethod()

* refactor: misc-use-internal-linkage warnings in platform util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- struct TrashItemResult
- TrashItemOnBlockingThread()
2024-11-27 10:40:39 -06:00
Charles Kerr
4aa1855e39
refactor: use base::Extend in AddAdditionalSchemes() (#44839) 2024-11-27 07:55:54 -06:00
Charles Kerr
f595443a22
refactor: fix modernize-return-braced-init-list warnings (#44838)
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]

* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]

NB: using the braced-initializer list uncovered an error here:
the float returned by std::floor() can't be implicitly cast to
an int. This is solved by using base::ClampFloor<int>() instead.
std::floor()
2024-11-27 09:41:46 +09:00
dependabot[bot]
9f1e23c405
build(deps): bump github/codeql-action from 3.27.4 to 3.27.5 (#44837)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.4 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ea9e4e3799...f09c1c0a94)

---
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>
2024-11-26 11:26:35 +01:00
Charles Kerr
93f49d1189
fix: modernize-use-using clang-tidy warnings (#44806) 2024-11-25 10:50:33 -05:00
Charles Kerr
3c941c7e8f
fix: modernize-avoid-c-arrays (#44813)
use string_view for constants used in methods that take string_view args
2024-11-25 10:49:58 -05:00
Charles Kerr
024fee4e44
fix: modernize-use-nodiscard clang-tidy warnings (#44808) 2024-11-25 10:48:28 -05:00
electron-roller[bot]
7e7010dacf
chore: bump chromium to 133.0.6852.0 (main) (#44748)
* chore: bump chromium in DEPS to 133.0.6847.0

* chore: bump chromium in DEPS to 133.0.6848.0

* chore: update patches

* implement extensions::GlobalShortcutListener::ExecuteCommand stub

https://chromium-review.googlesource.com/c/chromium/src/+/5871484

* fix: ismediakey patch, oops

* fix: another missing bracket

* chore: bump chromium in DEPS to 133.0.6850.0

* chore: update patches

* SharedStorageOperationPtr -> SharedStorageModifierMethodPtr

https://chromium-review.googlesource.com/c/chromium/src/+/5990970

* build GlobalShortcutListenerLinux

https://chromium-review.googlesource.com/c/chromium/src/+/5871484

* chore: bump chromium in DEPS to 133.0.6851.0

* fix: include full type for network::mojom::SharedStorageModifierMethod

* chore: update patches

* chore: bump chromium in DEPS to 133.0.6852.0

* chore: update patches

* build: remove duplicated icudtl.dat and snapshot_blob.bin

https://chromium-review.googlesource.com/c/chromium/src/+/5999387

* fix: include static methods in node tests involving call stacks

https://chromium-review.googlesource.com/c/v8/v8/+/5907815

* revert: moved code in picture-in-picture.patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2024-11-25 10:45:47 -05:00
Ajay Kemparaj
fbe01cdc16
docs: correct stable release dates for v34.0.0 (#44807)
* docs: correct stable release dates for v34.0.0

* docs: correct stable release dates for v34.0.0
2024-11-25 10:43:56 -05:00
Niklas Wenzel
b8b2e12c9c
docs: fix wording in auto-updater.md (#44787)
* docs: fix wording in auto-updater.md

* docs: update wording

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

---------

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2024-11-24 13:00:42 -08:00
Charles Kerr
94a65df270
refactor: remove unnecessary constructor code (#44816) 2024-11-24 08:55:46 -06:00
Charles Kerr
24df5f96d7
fix: remove unused local variables (#44815)
* chore: remove unused local non-trivial variable relaunch_executable

became unused in June 2016 in 0d066de5

* chore: only declare program_name local variable if used

We declared it everywhere but only used it on Windows

* chore: remove unused local non-trivial variable path from UnregisterXWindow

it became unused in 2020 by 72a08926
2024-11-23 17:34:51 -06:00
David Sanders
4a3513377c
docs: update new GitHub issue link (#44791) 2024-11-22 11:48:59 -08:00
Savely Krasovsky
c5ea177b3d
feat: add query-session-end and improve session-end events on Windows (#44598)
* feat: add query-session-end event for Windows

* fix: remove debug line

* feat: notify with reason on session-end

* docs: add comments and return params

* docs: add same docs to the BrowserWindow

* fix: add shutdown reason if lParam == 0

* docs: remove 'force' word

* docs: revert multithreading.md change

* docs: add reasons documentation, reason variable renamed to reasons

* docs: improve 'shutdown' reason wording

* docs: reword with 'can be'

* fix: pass reasons by reference

* fix: use newer approach which expose reasons value directly on Event object

* docs: add escaping

* style: linter fixes

* fix: project now should compile

* fix: EmitWithoutEvent method added, EmitWithEvent moved to private again

* docs: typo fix

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* docs: dedicated WindowSessionEndEvent type created

* docs: better wording for session-end event description

Co-authored-by: Will Anderson <will@itsananderson.com>

---------

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Will Anderson <will@itsananderson.com>
2024-11-22 11:47:36 -08:00
Shelley Vohr
0285592d61
fix: crash calling shell.readShortcutLink (#44784)
fix: crash calling shell.readShortcutLink
2024-11-22 09:37:17 -05:00
Shelley Vohr
86e4529d26
fix: ensure context-menu emitted for draggable regions (#44761)
* fix: ensure context-menu emitted for draggable regions

* chore: address suggestions from review
2024-11-22 12:33:38 +01:00
Charles Kerr
4fd1b5b186
fix: big endian bug in V8 serialization (#44776) 2024-11-22 12:04:53 +01:00
BILL SHEN
1d55eb9a45
build: remove duplicate line in gn file (#44786)
style: remove duplicate line in gn file
2024-11-22 12:03:49 +01:00
Charles Kerr
0005ae9557
docs: sync 34.0.0 release date to Chromium 132 release date (#44766) 2024-11-21 10:51:19 -06:00
Charles Kerr
86962ba2c3
fix: clang-tidy performance-inefficient-vector-operation warnings (#44743)
* fix: performance-inefficient-vector-operation warning in Clipboard::WriteFilesForTesting()

* fix: performance-inefficient-vector-operation warning in GetUploadedReports()
2024-11-20 18:11:00 -06:00
Charles Kerr
6789431f74
fix: performance-no-automatic-move clang-tidy warnings (#44742)
* fix: performance-no-automatic-move in GetLogFileName()

remove `const` from log_filename.

Warning fixed by this commit:

../../electron/shell/common/logging.cc:40:12: warning: constness of 'log_filename' prevents automatic move [performance-no-automatic-move]

* fix: performance-no-automatic-move in GetBundleResourcePath()

remove `const` from request_relative_path.

Warning fixed by this commit:

electron/shell/browser/extensions/electron_extensions_browser_client.cc:187:10: warning: constness of 'request_relative_path' prevents automatic move [performance-no-automatic-move]
2024-11-20 18:10:30 -06:00
nilaoda
0ea64850af
fix: windows save dialog extension bug (#44296)
* fix: windows save dialog extension bug

* refactor: simplify firstSpec extraction

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

* refactor: split when necessary

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
2024-11-20 17:27:49 -05:00
Den Delimarsky
769b045c8b
docs: removes redundant phrasing in the code signing documentation (#44716)
Update code-signing.md
2024-11-20 16:41:01 -05:00
Charles Kerr
85e2622b68
refactor: use gdk_display_beep() on Linux (#44734)
* refactor: use gdk_display_beep() to beep on Linux

* chore: make a stub declaration for gdk_display_beep()

* chore: remove unused file electron_gtk.sigs

* chore: remove unused #includes to make gn check happy
2024-11-20 16:24:59 -05:00
electron-appveyor-updater[bot]
15c3064780
build: update appveyor image to latest version (#44751)
Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>
2024-11-20 16:18:01 -05:00
Shelley Vohr
f95e1d8ea0
chore: fix textured window conditional on macOS (#44728) 2024-11-20 10:34:46 -06:00
Shelley Vohr
eba0edf81e
build: allow unbundling of Node.js dependencies (#44754) 2024-11-20 11:34:37 -05:00
Sam Maddock
8223ebc111
test: run script to help target discovery and reduce flakes (#44741) 2024-11-20 08:55:09 -06:00
Shelley Vohr
54d53bfa51
fix: tooltips in WCO caption buttons (#44721)
fix: tooltips in WCO capton buttons
2024-11-20 12:45:08 +01:00
dependabot[bot]
8ed48e2295
build(deps): bump mikefarah/yq from 4.44.3 to 4.44.5 (#44714)
Bumps [mikefarah/yq](https://github.com/mikefarah/yq) from 4.44.3 to 4.44.5.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](bbdd97482f...bc5b54cb1d)

---
updated-dependencies:
- dependency-name: mikefarah/yq
  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>
2024-11-20 10:49:50 +01:00
electron-roller[bot]
43ed763f18
chore: bump chromium to 133.0.6846.0 (main) (#44665)
* chore: bump chromium in DEPS to 133.0.6836.0

* chore: bump chromium in DEPS to 133.0.6838.0

* chore: update patches

* 6006096: [Sync ESB] Integrate Chrome Toast UI

https://chromium-review.googlesource.com/c/chromium/src/+/6006096

* Confine enable_device_bound_sessions buildflag to //net

https://chromium-review.googlesource.com/c/chromium/src/+/6014679

* revert [api] Delete deprecated struct FastApiTypedArray

 https://chromium-review.googlesource.com/c/v8/v8/+/5982984
Also
https://chromium-review.googlesource.com/c/v8/v8/+/5979766/1

* fixup revert [api] Delete deprecated struct FastApiTypedArray

* Migrate remaining NOTREACHED()s in chrome/

https://chromium-review.googlesource.com/c/chromium/src/+/5998172

* [Reland][Extensions] Remove ExtensionHostDelegate::GetJavaScriptDialogManager()

https://chromium-review.googlesource.com/c/chromium/src/+/6020106

* Remove NOTREACHED_IN_MIGRATION()

https://chromium-review.googlesource.com/c/chromium/src/+/6021996

* Remove Lock screen apps [#8] : remove lock screen extension

https://chromium-review.googlesource.com/c/chromium/src/+/6005846

* Reland "Add CrashReporterClient::GetProductInfo(ProductInfo*)"

https://chromium-review.googlesource.com/c/chromium/src/+/6012631

* Ozone/Wayland: remove lacros specific window states

https://chromium-review.googlesource.com/c/chromium/src/+/6011215

* chore: bump chromium in DEPS to 133.0.6840.0

* chore: bump chromium in DEPS to 133.0.6841.0

* chore: bump chromium in DEPS to 133.0.6844.0

* implement virtual WebContents::CanUserEnterFullscreen

* OnSearchifyStateChange -> OnSearchifyStarted

* regen libc++ filenames

* chore: bump chromium in DEPS to 133.0.6846.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2024-11-19 19:52:20 -08:00
Charles Kerr
ac61c74ddc
fix: bugprone-narrowing-conversions warnings in NativeImage (#44708)
* fix: bugprone-narrowing-conversions warning in NativeImage::memory_usage_

- fix signed / unsigned math by using base/numerics/safe_conversions

- make memory_usage_ an int64_t so it can safely take the size_t
  returned by computeByteSize()

Warning fixed by this commit:

../../electron/shell/common/api/electron_api_native_image.cc:155:26: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined [bugprone-narrowing-conversions]
  155 |       new_memory_usage = image_skia->bitmap()->computeByteSize();

* fix: bugprone-narrowing-conversions warnings in NativeImage::CreateFromBitmap()

`SkImageInfo::MakeN32()` and `SkBitmap::allocN32Pixels()` both take int
width and height args, but we were feeding them unsigned ints.

../../electron/shell/common/api/electron_api_native_image.cc:508:36: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  508 |   auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
      |                                    ^
../../electron/shell/common/api/electron_api_native_image.cc:508:43: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  508 |   auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
      |                                           ^
../../electron/shell/common/api/electron_api_native_image.cc:524:25: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  524 |   bitmap.allocN32Pixels(width, height, false);
      |                         ^
../../electron/shell/common/api/electron_api_native_image.cc:524:32: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  524 |   bitmap.allocN32Pixels(width, height, false);
      |                                ^
../../electron/shell/common/api/electron_api_native_image.cc:528:48: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]
  528 |       gfx::ImageSkia::CreateFromBitmap(bitmap, scale_factor);
2024-11-19 16:04:18 -06:00
Charles Kerr
1cf5e6d88c
fix: cyclical #include dependency between autofill_popup.h and autofill_popup_view.h (#44705)
fix: AutofillPopup warning: use '= default' to define a trivial default constructor [modernize-use-equals-default]

refactor: reduce #indclude scope in autofill_popup.h and autofill_popup_view.h
2024-11-19 13:45:18 -06:00
Robo
48c9149a52
fix: utility process exit code for graceful termination (reland) (#44726)
* chore: reland "fix: utility process exit code for graceful termination"

This reverts commit 1cae73ba09.

* fix: exit code on posix when killed via api

* chore: fix code style
2024-11-20 02:48:15 +09:00
Robo
0d6743e79b
fix: destroy url loader wrapper when JS env exits (#44574)
* fix: destroy url loader wrapper when JS env exits

* Revert "fix: destroy url loader wrapper when JS env exits"

This reverts commit 419151a98a16814ea63e9abc197c6ae27f48128c.

* Revert "Revert "fix: destroy url loader wrapper when JS env exits""

This reverts commit 4b401b03c62aca79498660f995825491ae52f179.

* fix: double free of JSChunkedDataPipeGetter

* fix: crash on process exit after stream completes
2024-11-19 11:32:48 -05:00
Shelley Vohr
7a5e9613d2
build: rework header generation in Node.js (#44657)
* build: rework header generation in Node.js

* build: fix patch location error

* fix: set --root-dir correctly
2024-11-19 10:57:38 -05:00
dependabot[bot]
9d1be5f824
build(deps): bump the npm_and_yarn group across 2 directories with 1 update (#44701)
Bumps the npm_and_yarn group with 1 update in the / directory: [cross-spawn](https://github.com/moxystudio/node-cross-spawn).
Bumps the npm_and_yarn group with 1 update in the /spec directory: [cross-spawn](https://github.com/moxystudio/node-cross-spawn).


Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 15:06:42 +01:00
Shelley Vohr
4b3d1caae4
fix: improve single-pixel resize handling on Windows (#44700)
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-11-19 13:24:07 +01:00
dependabot[bot]
2cea2282eb
build(deps): bump slackapi/slack-github-action from 1.27.0 to 2.0.0 (#44715)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.27.0 to 2.0.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](37ebaef184...485a9d42d3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 11:45:56 +01:00
dependabot[bot]
8efc4c7a56
build(deps): bump github/codeql-action from 3.27.1 to 3.27.4 (#44713)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.1 to 3.27.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4f3212b617...ea9e4e3799)

---
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>
2024-11-19 11:45:09 +01:00
David Sanders
febf305a4f
chore: fix unsupported major comment in issue automation (#44706) 2024-11-19 10:52:08 +01:00
Robo
1cae73ba09
chore: Revert "fix: utility process exit code for graceful termination" (#44717)
Revert "fix: utility process exit code for graceful termination (#44698)"

This reverts commit 36e1a0bf00.
2024-11-18 22:13:23 -06:00
Will Anderson
10d967028a
docs: Make ipcRenderer and ipcMain listener API docs consistent (#44651)
* docs: Make ipcRenderer and ipcMain listener API docs consistent

* test: add some unit tests for ipcRenderer/ipcMain listener behavior

* fix: Mark on/off methods as primary and addListener/removeListener as aliases

* fix: clear all listeners before running ipcMain removeAllListeners tests
2024-11-18 14:44:30 -08:00