* fix: disable background throttling also in the `viz::DisplayScheduler`
`viz::DisplayScheduler` is responsible for drawing and swapping frames
in the `DisplayScheduler::DrawAndSwap` which is called from the
`DisplayScheduler::AttemptDrawAndSwap` if the `DisplayScheduler::ShouldDraw`
returns true. `ShouldDraw` depends on the `DisplayScheduler` visibility
and when it is not visible then it returns false.
In order to keep producing frames, disabling `backgroundThrottling`
should also prevent changing `DisplayScheduler` visibility to false.
`DisplayScheduler` lives in the `ui::Compositor` where every
`electron::NativewWindow` has its own `Compositor`. `electron::NativewWindow`
may be host of the multiple `electron::api::WebContents` instances which may
have different `WebPreferences` settings. Therefore if at least one
of the `WebContents` requires disabling throttling then all other `WebContents`
using the same window will have it disabled in the `ui::Compositor`.
BREAKING CHANGE:
`backgroundThrottling` set to false will disable frames throttling
in the `BrowserWindow` for all `WebContents` displayed by it.
Close: [#31016](https://github.com/electron/electron/issues/31016)
* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`
* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`
* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`
---------
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* chore: bump chromium in DEPS to 117.0.5866.0
* chore: bump chromium in DEPS to 117.0.5868.0
* chore: update mas_no_private_api.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634925
Minor manual patch syncing due to upstream code shear
* chore: update mas_disable_remote_layer.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4647191
Manually sync patch to minor upstream code shear
* chore: update mas_disable_remote_accessibility.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4641746
No manual changes; patch applied with fuzz
* chore: update mas_avoid_usage_of_private_macos_apis.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634925
Manually sync base/process/launch_mac.cc to minor upstream shear
Manually sync base/mac/foundation_util.mm to upstream changes:
_CFIsObjC use has been removed upstream, so we no longer need
to remove it 🎉
* chore: update printing.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658496
Manually sync patch to minor upstream code shear
* chore: update disable_color_correct_rendering.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4625254
Manually sync patch to minor upstream code shear
* chore: update feat_expose_raw_response_headers_from_urlloader.patch
Xref: services/network/public/cpp/resource_request.cc
No manual changes; patch applied with fuzz
* chore: update add_electron_deps_to_license_credits_file.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634961
No manual changes; patch applied with fuzz
* chore: update build_only_use_the_mas_build_config_in_the_required_components.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4648411
No manual changes; patch applied with fuzz
* chore: update patches
* fixup! chore: update add_electron_deps_to_license_credits_file.patch
chore: license files must be an array
* chore: bump chromium in DEPS to 117.0.5870.0
* chore: update patches
* chore: run ./script/gen-libc++-filenames.js
* chore: update json_parse_errors_made_user-friendly.patch
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/4652014
v8 error message changed upstream; update Node test to match it
* chore: bump chromium in DEPS to 117.0.5872.0
* chore: update patches
* chore: explicitly cast x11::Window to unsigned int
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4661049
This is an `enum class Window : uint32_t` defined in ui/gfx/x/xproto.h.
Previous versions of clang let this implicit cast happen,
but it generates a warning in the new clang roll.
* chore: remove unused #include
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4650453
header was removed upstream, so FTBFS unless removed here
* chore: add include guard patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373
h/t @jkleinsc
* chore: bump chromium in DEPS to 117.0.5874.0
* chore: update render_widget_host_view_mac.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4661244
Manually sync patch to minor upstream code
* chore: update mas_disable_remote_accessibility.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4653209
Manually sync patch to upstream code shear
* chore: update build_only_use_the_mas_build_config_in_the_required_components.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4653209
Manually sync patch to minor upstream code shear
* chore: update GetInitiatorProcessId()
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4641991
trivial upstream naming change: s/ProcessID/ProcessId/
* chore: sync to upstream SetInputRegion() changes
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4665245
Simple upstream chang: SetInputRegion() used to take a gfx::Rect* where
`nullptr` meant "no opaque region". The function signature changed to
absl::optional<gfx::Rect> w/the same meaning.
* chore: sync to upstream SetOpaqueRegion() changes
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4656738
Simple upstream chang: SetOpaqueRegion() used to take a vector<Rect>* where
`nullptr` meant "no opaque region". The function signature changed to
absl::optional<std::vector<gfx::Rect>> w/the same meaning.
* chore: update patches
* chore: bump chromium in DEPS to 117.0.5876.0
* chore: update mas_disable_remote_accessibility.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658375
We no longer need to patch out a field that's now removed upstream.
RenderWidgetHostNSViewBridgeOwner.remote_accessibility_element_
* chore: update feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658680
Manually sync patch to upstream code shear (ARC adoption).
* chore: update patches
* fix: -Werror,-Wshadow error in Node.js
* chore: bump chromium in DEPS to 117.0.5878.0
* chore: bump chromium in DEPS to 117.0.5880.0
* chore: bump chromium in DEPS to 117.0.5880.4
* chore: update patches
* 4658680: Convert /content/browser to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4658680
* 4669995: Remove CFToNSCast and NSToCFCast
https://chromium-review.googlesource.com/c/chromium/src/+/4669995
* WIP: 4658680: Convert /content/browser to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4658680
* chore: update printing patch after rebase
* chore: bump chromium in DEPS to 117.0.5882.0
* Revert "WIP: 4658680: Convert /content/browser to use ARC"
This reverts commit c8559ea448ad93123865a6fa8af6fe2767e43396.
* Revert "4669995: Remove CFToNSCast and NSToCFCast"
This reverts commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e.
* chore: bump chromium in DEPS to 117.0.5874.0
* 4661244: Convert /content/browser/renderer_host to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4661244
* 4653209: Convert /ui/views:views to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4653209
* chore: fixup mas_disable_remote_accessibility.patch
* chore: fixup render_widget_host_view_mac.patch
* chore: update to newer clang
* chore: bump chromium in DEPS to 117.0.5884.1
(cherry picked from commit a3879acfde8f3d962d58d6ad0632164ccb88ee63)
* 4669995: Remove CFToNSCast and NSToCFCast
https://chromium-review.googlesource.com/c/chromium/src/+/4669995
(cherry picked from commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e)
(cherry picked from commit b1224ab7e00aedbd0e5dc78ebb3c6162573b28c4)
* 4658680: Convert /content/browser to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4658680
(cherry picked from commit 77039a323b9ebb3e8edb3a92a3b94a8d7d026a32)
* Rename and cleanup ExtensionsBrowserClient functions
| https://chromium-review.googlesource.com/c/chromium/src/+/4665670
(cherry picked from commit 677a2e646a8d82da60dc252b08b320c3ddff6be6)
* chore: bump chromium in DEPS to 117.0.5886.0
* chore: update patches
* Revert "chore: update patches"
This reverts commit db9294f9446492d4a3d63f5f3ecc551aeeeb2e26.
* Revert "chore: bump chromium in DEPS to 117.0.5886.0"
This reverts commit a7de0276e6e0eeecfdbb17f9bbc27c01b4bbfc24.
* build: use built toolchains instead of locally installed VSCode
* fixup: build: use built toolchains instead of locally installed VSCode
* chore: add missing mojo dep
---------
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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* feat: remove enable_run_as_node flag
* drop features.isRunAsNodeEnabled()
* use IsEnvSet() helper in electron_main_linux.cc
* cleanup [[maybe_unused]]
---------
Co-authored-by: Milan Burda <miburda@microsoft.com>
* 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