* fix: wrong api call
* fix: consistency of the resize state
* fix: edge cases
* chore: add detailed comments
* fix: lint
* chore: only windows
* chore: use transparent
Dynamic ESM import in non-context-isolated preload
Extend `HostImportModuleWithPhaseDynamically`'s routing to support
Node.js import resolution in non-context-isolated preloads through
`v8_host_defined_options` length check. The length of host defined
options is distinct between Blink and Node.js and we can use it to
determine which resolver to use.
* build: update build tools to get proper exit codes from e build
xref: https://github.com/electron/build-tools/pull/759
* build: target zips directly
mksnapshot and chromedriver have issues with siso trying to run a separate build and zip step, so just target the zip target
* build: don't unzip chromedriver and mksnapshot in tests
The contents of these files are not used in testing, so we shouldn't unzip them.
perf: two minor perf refactors in InvokeIpcCallback()
1. Allocate the CallbackScope on the stack instead of the heap
2. Skip a redundant call to node::Environment::GetCurrent()
* docs: mention that webUtils should be used via preload script
* docs: suppress lint errors
* docs: clarify webUtils usage scope
* docs: exclude potentially dangerous alert() in the example code
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: minor change
* docs: make linter happy
* docs: apply suggestion
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
* docs: apply suggestion
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
* docs: apply suggestion
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
* docs: minor change
* docs: minor change
* docs: remove preload line
---------
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
* refactor: make api::Clipboard::GetClipboardBuffer() private
* refactor: move GetClipboadBuffer() into anonymous namespace
* refactor: use gin::Arguments in StopRecording()
* refactor: use gin::Arguments in ImageView::New()
* refactor: use gin::Arguments in AppendSwitch()
* refactor: use gin::Arguments WebContentsView::New()
* refactor: make gin::Arguments arg const in WrappableBase::InitWithArgs()
This makes explicit that we are using it for wrapper + isolate, not the args values
* refactor: remove gin_helper::Arguments arg from ExposeAPI()
refactor: remove gin_helper::Arguments arg from ExposeAPIInWorld()
* refactor: remove gin_helper::Arguments arg from ElectronBindings::GetSystemMemoryInfo()
* refactor: remove gin_helper::Arguments arg from preload_utils::GetBinding()
* refactor: use gin::Arguments in OpenExternal()
* refactor: use gin::Arguments in ExecuteInWorld()
* refactor: use gin::Arguments in ExecuteJavaScript()
* refactor: use gin::Arguments in InvokeNew()
* refactor: use gin::Arguments in ExecuteJavaScriptInIsolatedWorld()
* refactor: remove unused GetNextArgument() marshaller for gin_helper::Arguments
* refactor: remove unused #include gin_helper/arguments.h
* chore: remove unused gin_helper::Arguments
* fixup! refactor: use gin::Arguments in ExecuteJavaScriptInIsolatedWorld()
Xref: https://github.com/electron/electron/pull/48447
We overriden the `GetPackageJSON` in Node.js to let us read files
straight from the ASAR file instead of disk. The override works by
providing a JS method with the limitation that it should not throw a
runtime error. However, this invariant was accidentally violated by
`asar.splitPath` that sometimes contrary to its' TypeScript definition
returned `false`.
fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike
Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth
vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window
shadow to be rendered from a fully transparent surface, causing the
WindowServer GPU load regression. Remove the `cornerMask` property and
the `_cornerMask` override so we stay on Apple’s default shadow path.
* refactor: make api::Menu inherit from gin::Wrappable*
* refactor: make api::Menu::kWrapperInfo const
* refactor: use three-arg version of GetConstructor in Menu
refactor: undo branch changes to two-arg version of GetConstructor
* fixup! refactor: make api::Menu inherit from gin::Wrappable*
fix: return type of Menu::New
* fixup! refactor: make api::Menu inherit from gin::Wrappable*
make MenuMac's constructor public so that cppgc can use it
* refactor: Pinnable -> SelfKeepAlive
* refactor: use gin::Arguments::ThrowTypeError() in AutoUpdater::SetFeedURL()
* refactor: use gin::Arguments::ThrowTypeError() in Browser::Focus()
* refactor: use gin::Arguments::ThrowTypeError() in SystemPreferences::SetUserDefault()
* refactor: use gin::Arguments::ThrowTypeError() in UtilityProcessWrapper::Create()
* refactor: use gin::Arguments::ThrowTypeError() in UtilityProcessWrapper::PostMessage()
* refactor: use gin::Arguments::ThrowTypeError() in ElectronBundleMover::ShouldContinueMove()
* refactor: use gin::Arguments::ThrowTypeError() in OnClientCertificateSelected()
* refactor: use gin::Arguments::ThrowTypeError() in Session::ClearData()
* refactor: use gin::Arguments::ThrowTypeError() in ElectronBrowserContext::DisplayMediaDeviceChosen()
* refactor: use gin::Arguments::ThrowTypeError() in WebContents::ReplaceMisspelling()
* refactor: use gin::Arguments::ThrowTypeError() in WebContents::Print()
* chore: iwyu shell/common/gin_helper/error_thrower.h
* test: rerun failed tests individually
* ci: use screencapture-nag-remover
Needed to bypass the popup message "bash" is requesting to bypass the system private window picker and directly access your screen and audio.
* Revert "chore: test with 1st quadrant of the window"
No longer needed because of the addition of the
screencapture-nag-remover script.
This reverts commit f4a7e04c0b.
* test: fixup navigationHistory flake
* rerun test up to 3 times
* refactor: make api::Clipboard::GetClipboardBuffer() private
* refactor: move GetClipboadBuffer() into anonymous namespace
* refactor: use gin::Arguments in BaseWindow::MoveAbove()
refactor: use gin::Arguments in BaseWindow::SetAlwaysOnTop()
refactor: use gin::Arguments in BaseWindow::SetIgnoreMouseEvent()
* refactor: use gin::Arguments in BaseWindow::SetProgresBar()
* refactor: use gin::Arguments in BaseWindow::SetVisibleOnAllWorkspaces()
* refactor: use gin::Arguments in BaseWindow::SetVibrancy()
* refactor: use gin::Arguments in BaseWindow::SetAspectRatio()
* refactor: use gin::Arguments in BaseWindow::PreviewFile()
* refactor: use gin::Arguments in BaseWindow::SetThumbarButtons()
* refactor: use gin::Arguments in BaseWindow::SetBounds()
* refactor: use gin::Arguments in BaseWindow::SetContentBounds()
* refactor: use gin::Arguments in BaseWindow::SetSize()
* refactor: use gin::Arguments in BaseWindow::SetContentSize()
* refactor: use gin::Arguments in BaseWindow::SetSheetOffset()
* refactor: use gin::Arguments in BaseWindow::SetPosition()
* refactor: use gin::Arguments in BaseWindow::AddTabbedWindow()
* refactor: use gin::Arguments in BaseWindow::SetParentWindow()
* refactor: use gin::Arguments in BaseWindow::BaseWindow()
* refactor: use gin::Arguments in BaseWindow::SetAccentColor()
* refactor: use gin::Arguments in BaseWindow::SetTitleBarOverlay()