* chore: drop support for Windows 7 & 8
* chore: remove disable-redraw-lock.patch
* chore: update patches
* Update docs/breaking-changes.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* Update docs/breaking-changes.md
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
* fix breaking-changes.md
* chore: note last supported version
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* chore: add link to deprecation policy
* Update docs/breaking-changes.md
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* update README.md
Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* feat: add support for WebUSB
* fixup for gn check
* fixup gn check on Windows
* Apply review feedback
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: address review feedback
* chore: removed unneeded code
* Migrate non-default ScopedObservation<> instantiations to ScopedObservationTraits<> in chrome/browser/
https://chromium-review.googlesource.com/c/chromium/src/+/4016595
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* hore: Move draggable regions implementation from NativeBrowserView into InspectableWebContentsView
The draggable regions implementation is related to WebView, so
InspectableWebContentsView is a more appropriate place to put it there.
Also, this refactoring will allow the subsequent extension of the
WebContentsView API, which will eventually replace BrowserView API.
* fix: Lint error
* fix: Adjusted owner-window
* refactor: use views NonClientHitTest for draggable regions on mac
* iwyu
* add backport of 9bb5f0316
* chore: update patches
* remove some unneeded functions
* remove test for triggering when BW is focused
* chore: update patches
* simplify views/mac split now that the draggable logic is the same
* Apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* Update shell/browser/native_window.h
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix build
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: WebAuthn Discoverable Credential (Resident Credential) #33353
Enables support for Webauthn discoverable credentials (aka resident
credentials). This allows users to authenticate without first having to
select or type a username.
To decide if discoverable credentials are supported, the class
'AuthenticatorCommon', in the chrome content code, indirectly calls the
method 'context::WebAuthenticationDelegate.SupportsResidentKeys(..)'.
The default implementation of this returns false, leaving it up to
specific implementations to override.
This change adds a new class 'ElectronWebAuthenticationDelegate' to
subclass 'WebAuthenticationDelegate' and override the behaviour of the
'SupportsResidentKeys' method to return true.
The implementation is copied from the Chrome browser equivalent
'ChromeWebAuthenticationDelegate', though the chrome class includes
other methods that don't seem to be required for this functionality.
The 'ElectronContentClient' class was also updated to store an instance
of 'ElectronWebAuthenticationDelegate', and to provide an accessor
method, GetWebAuthenticationDelegate().
* Remove redundant, commented-out code
* style: comment cleanup
* style: updated comments and formatting based on pull request review
* style: fix lint error on header guard clause
* refactor: unduplicate MediaStreamDevicesController
* restore old logic for GUM_* request types
* lint
* gn format
* add test for unsupported getDisplayMedia
* simplify + comment
* feat: add immersive dark mode
* fix syntax and add header
* add me
* Update fuses.json5
* fix: redraw title bar on dark mode change
* chore: SetWindowTheme doesn't seem to be needed
* chore: separate out Win 10 dark mode implementation
* final touches
* final touches
* chore: limit Win 10 to >= 20H1 and drop fuse
* fix types
* fix lint
Co-authored-by: Micha Hanselmann <micha.hanselmann@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* feat: add support for HIDDevice.forget()
* chore: remove whitespace
* chore: use `SetGetter` to serialize the render_frame_host
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
* fixup chore: use `SetGetter` to serialize the render_frame_host
* fixup after rebase
* fixup for crash on navigator.serial.getPorts()
* fixup for lint
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
* fix: don't call X11 functions in file dialog and message box
* refactor: remove unused GtkUiPlatform declaration
* fix: set gtk darktheme only when running under X11
* fix: replace X11 window state watcher with implementation using ozone
* fix: make sure global menu barr is used only when supported
* fix: don't call X11 function in native window views under wayland
* style: fix lint issues
* fix: use GtkUiPlatform::ShowGtkWindow instead of gtk_window_present directly
* refactor: extract CreateGlobalMenuBar into separate function
* refactor: move checking for WaylandWindowDecorations inside class
* fix: check if we run under X11 only in ozone build
* refactor: drop including unused ui/base/ui_base_features.h header
* fix: modify ui_gtk_public_header.patch to also export gtk_ui.h
* fix: refactor guarding of X11 calls
- Introduce patch exposing new electron_can_call_x11 property
- Replace defined(USE_OZONE) with BUILDFLAG(OZONE_PLATFORM_X11) flags
* fix: remove the last remaining usage of USE_X11
* fix: usage of BUILDFLAG(OZONE_PLATFORM_X11) not building on non ozone
* fix: call UpdateWindowState from OnBoundsChanged only under X11
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
* fix: re-enable PartitionAlloc on macOS
* no need to copy ignore_result on linux
* factor out FixStdioStreams
* include buildflags.h in electron_main_linux
* #include electron/fuses
* more missing includes
* feat: add support for WebHID
* Apply suggestions from code review
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* Address review feedback
* Address review feedback
* chore: clear granted_devices on navigation
Also added test to verify devices get cleared
* fixup testing for device clear
* make sure navigator.hid.getDevices is run on correct frame
* clear granted devices on RenderFrameHost deletion/change
* manage device permissions per RenderFrameHost
This change makes sure we don't clear device permission prematurely due to child frame navigation
* Update shell/browser/api/electron_api_web_contents.cc
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* apply review feedback from @zcbenz
* Match upstream ObjectMap
This change matches what ObjectPermissionContextBase uses to cache object permissions: https://source.chromium.org/chromium/chromium/src/+/main:components/permissions/object_permission_context_base.h;l=52;drc=8f95b5eab2797a3e26bba299f3b0df85bfc98bf5;bpv=1;bpt=0
The main reason for this was to resolve this crash on Win x64:
ok 2 WebContentsView doesn't crash when GCed during allocation
Received fatal exception EXCEPTION_ACCESS_VIOLATION
Backtrace:
gin::WrappableBase::SecondWeakCallback [0x00007FF6F2AFA005+133] (o:\gin\wrappable.cc:53)
v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacks [0x00007FF6F028F9AB+171] (o:\v8\src\handles\global-handles.cc:1400)
v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacksFromTask [0x00007FF6F028F867+391] (o:\v8\src\handles\global-handles.cc:1387)
node::PerIsolatePlatformData::RunForegroundTask [0x00007FF6F3B4D065+317] (o:\third_party\electron_node\src\node_platform.cc:415)
node::PerIsolatePlatformData::FlushForegroundTasksInternal [0x00007FF6F3B4C424+776] (o:\third_party\electron_node\src\node_platform.cc:479)
uv_run [0x00007FF6F2DDD07C+492] (o:\third_party\electron_node\deps\uv\src\win\core.c:609)
electron::NodeBindings::UvRunOnce [0x00007FF6EEE1E036+294] (o:\electron\shell\common\node_bindings.cc:631)
base::TaskAnnotator::RunTask [0x00007FF6F2318A19+457] (o:\base\task\common\task_annotator.cc:178)
base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl [0x00007FF6F2E6F553+963] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:361)
base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork [0x00007FF6F2E6EC69+137] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:266)
base::MessagePumpForUI::DoRunLoop [0x00007FF6F235AA58+216] (o:\base\message_loop\message_pump_win.cc:221)
base::MessagePumpWin::Run [0x00007FF6F235A01A+106] (o:\base\message_loop\message_pump_win.cc:79)
base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run [0x00007FF6F2E702DA+682] (o:\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:470)
base::RunLoop::Run [0x00007FF6F22F95BA+842] (o:\base\run_loop.cc:136)
content::BrowserMainLoop::RunMainMessageLoop [0x00007FF6F14423CC+208] (o:\content\browser\browser_main_loop.cc:990)
content::BrowserMainRunnerImpl::Run [0x00007FF6F144402F+143] (o:\content\browser\browser_main_runner_impl.cc:153)
content::BrowserMain [0x00007FF6F143F911+257] (o:\content\browser\browser_main.cc:49)
content::RunBrowserProcessMain [0x00007FF6EFFA7D18+112] (o:\content\app\content_main_runner_impl.cc:608)
content::ContentMainRunnerImpl::RunBrowser [0x00007FF6EFFA8CF4+1220] (o:\content\app\content_main_runner_impl.cc:1104)
content::ContentMainRunnerImpl::Run [0x00007FF6EFFA87C9+393] (o:\content\app\content_main_runner_impl.cc:971)
content::RunContentProcess [0x00007FF6EFFA73BD+733] (o:\content\app\content_main.cc:394)
content::ContentMain [0x00007FF6EFFA79E1+54] (o:\content\app\content_main.cc:422)
wWinMain [0x00007FF6EECA1535+889] (o:\electron\shell\app\electron_main.cc:291)
__scrt_common_main_seh [0x00007FF6F6F88482+262] (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
BaseThreadInitThunk [0x00007FFEC0087034+20]
RtlUserThreadStart [0x00007FFEC1F02651+33]
✗ Electron tests failed with code 0xc0000005.
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* feat: add support for validating asar archives on macOS
* chore: fix lint
* chore: update as per feedback
* feat: switch implementation to asar integrity hash checks
* feat: make ranged requests work with the asar file validator DataSourceFilter
* chore: fix lint
* chore: fix missing log include on non-darwin
* fix: do not pull block size out of missing optional
* fix: match ValidateOrDie symbol on non-darwin
* chore: fix up asar specs by repacking archives
* fix: maintain integrity chain, do not load file integrity if header integrity was not loaded
* debug test
* Update node-spec.ts
* fix: initialize header_validated_
* chore: update PR per feedback
* chore: update per feedback
* build: use final asar module
* Update fuses.json5
* rebase "feat: enable windows control overlay on Windows"
* correct compilation error
* fix linting errors
* modify includes and build file
* change `hidden` option to `overlay`
* add patch to fix visual layout
* add button background color parameter
* add button text color parameter
* modify `overlay` in docs and modify button hover/press transition color
* change `text` to `symbol`
* remove todo and fix `text` replacement
* add new titleBarOverlay property and remove titleBarStyle `overlay`
* update browser and frameless window docs
* remove chromium patches
* chore: update patches
* change button hover color, update trailing `_`, update test file
* add dchecks, update title bar drawing checks, update test file
* modify for mac and linux builds
* update docs with overlayColor and overlaySymbolColor
* add corner and side hit test info
* modify docs and copyright info
* modify `titlebar_overlay_` as boolean or object
* move `title_bar_style_ to `NativeWindow`
* update docs with boolean and object titlebar_overlay_
* add `IsEmpty` checks
* move get options for boolean and object checks
* fix linting error
* disable `use_lld` for macos
* Update docs/api/frameless-window.md
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* Update docs/api/frameless-window.md
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* Update docs/api/frameless-window.md
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* Apply docs suggestions from code review
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* modify `true` option description `titleBarOverlay`
* ci: cleanup keychain after tests on arm64 mac (#30472)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* fix: navigator.bluetooth.requestDevice
* cleanup lint and add test
* update bluetooth test to handle no bluetooth adapter available
* update bluetooth test to handle bluetooth permission denied
* Rewrite titleBarStyle impls with WindowButtonsView
* Remove fullscreenWindowTitle option
* Make buttons show correctly under RTL
* Fix docs about traffic lights position
* Fix test on fullscreen resizable
* Fix button states with closabe/minimizable/fullscreenable
* Fix typo
* Deprecate the fullscreenWindowTitle option