feat: expose shouldUseDarkColorsForSystemIntegratedUI
Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.
This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.
* refactor: make api::View::GetBounds() const
* refactor: make api::View::OnViewBoundsChanged() private
refactor: make api::View::OnViewIsDeleting() private
refactor: make api::View::OnChildViewRemoved() private
* refactor: make ChildPair private
* refactor: use AddChildView(std::unique_ptr<View>) in OpaqueFrameView::CreateButton()
Xref: https://issues.chromium.org/issues/40485510
* refactor: use AddChildView(std::unique_ptr<View>) in MenuBar::RebuildChildren()
* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux labels
* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux buttons
* refactor: use AddChildView(std::unique_ptr<View>) in AutofillPopupView
* refactor: use AddChildViewRaw() to flag the edge cases that we still need to fix
* chore: use west coast const for consistency
* refactor: instantiate navigation_entries on the stack instead of the heap
* refactor: reserve the full size of navigation_entries
* refactor: use emplace_back to simplify the code a little
* chore: bump chromium in DEPS to 136.0.7076.0
* chore: bump chromium in DEPS to 136.0.7077.0
* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856
* 6356528: Clean up LegacyRenderWidgetHostHWND code | 6356528
* chore: export patches
* 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | 6339113
* 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | 6352169
* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856
* 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| 6360858
* chore: bump chromium in DEPS to 136.0.7079.0
* chore: export patches
* chore: bump chromium in DEPS to 136.0.7081.0
* chore: export patches
* chore: bump chromium in DEPS to 136.0.7083.0
* 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | 6361987
* chore: export patches
* chore: bump chromium in DEPS to 136.0.7087.0
* chore: export patches
* fix: include node patch for missing AtomicsWaitEvent
6385540
* build: add depot_tools python to path
* fix: cppgc init and unregistering v8 isolate
6333562
CppGc is now initialized earlier so Node can skip reinitializing it.
Additionally, gin::IsolateHandle was attempting to destruct an already destructed
v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call
to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown.
* fix: unregister isolate after destruction
See code comment.
* chore: bump chromium in DEPS to 136.0.7095.0
* chore: sync patches
* fix: add script_parsing::ContentScriptType parameter
6298395
* fix: migrate content::BrowserAccessibilityState methods
64014376383275
* feat: enableHappyEyeballs option for host resolver
6332599
* fix: add new cookie exclusion reason
6343479
* fix: add new url loader method
6337340
* fix: add new cppgc header file for electron_node headers
6348644
* fix: disable CREL on Linux ARM64
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9
* fixup! fix: add new cppgc header file for electron_node headers 6348644
* chore: update corner smoothing patch
* fixup! chore: update corner smoothing patch
* chore: disable NAN weak tests
These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback.
Ref: 4733273
* test: fix task starvation in node test
A V8 change makes these contexts get collected in a task that is posted
and run asynchronously. The tests were synchronously GC'ing in an
infinite loop, preventing the task loop from running the task that would
GC these contexts.
This change should be upstreamed in some way.
Ref: 4733273
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
* fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8
* fix: use CleanedUpAtExit to control the lifetime of GPUInfoManager
* fix: ensure maximize is emitted when reduce motion is enabled on macOS
* Revert "build: reenable graphics effects for macOS tests (#46454)"
This reverts commit 682ea345ac.
* perf: use an absl::flat_hash_set for UsbChooserContext::ephemeral_devices_
* perf: use an absl::flat_hash_set for GlobalMenuBarRegistrarX11::live_windows_
* perf: use an absl::flat_hash_set for NativeWindowViews::forwarding_windows_
* perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::guest_host_views_
perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::proxy_views_
* perf: use an absl::flat_hash_set for NativeWindow::injected_frames_
* perf: use an absl::flat_hash_set for NativeWindow::background_throttling_sources_
* perf: avoid redundant call to popup_bounds_in_view()
* refactor: use a std::optional<> for paint_canvas local
* fix: fix leaked gfx::Canvas in AutofillPopupView::OnPaint()
* refactor: remove redundant get() call when testing smart pointer for nonempty
* refactor: remove unnecessary draw_canvas variable
* refactor: rename bitmap to offscreen_bitmap for symmetry
* refactor: avoid another redundant call to popup_bounds_in_view()
* perf: avoid making an unnecessary copy of the vector
MimeTypesHandler::GetMIMETypeAllowlist() returns a const&, so we can
iterate that directly instead of making a temporary copy of it.
* perf: move the call to ExtensionRegistry::Get() outside of the loop
Also, keep the previous behavior of not calling it at all if there
aren't any whitelisted extensions.
* perf: avoid redundant map lookup
* refactor: const correctness
* refactor: cleanup
* feat: Corner Smoothing CSS rule (Reland)
Reland of #45185
* Fix patch conflicts
* fixup! Fix patch conflicts
* Update expected image
The dashed border is subtly different. The new version is correct and the old one was incorrect.
* feat: add support for associating a Menu with a WebFrameMain
This allows certain OS level features to activate such as Writing Tools, Autofill.. and Services.
There appears to be a bug in macOS where the responder chain isn't traversed if the menu is not popped up using an event, as such we spoof a fake mouse event at the write coordinates in the right window and use that to open the menu.
* build: fix build on non-mac
* build: oops missed a header
* fix: safely handle optional T* by checking nullptr too
* build: fix gn check and build errors
* docs: suggested changes
* feat: default `frame` to `window.webContents.mainFrame` when possible
* fix: avoid deref nullptr view
* Revert "feat: default `frame` to `window.webContents.mainFrame` when possible"
This reverts commit 2e888368199317d67f6ad931a7e9eff0295c4b1b.
* fix: lint
* Remove redundant scoped objects
This code, including the comments, matches almost exactly the behavior of this argument to the function.
* Add ScopedPumpMessagesInPrivateModes patch
* More null pointer safety
---------
Co-authored-by: clavin <clavin@electronjs.org>