Commit graph

2985 commits

Author SHA1 Message Date
Cheng Zhao
09669f9d21
fix: child window may have opener removed (#38910) 2023-06-26 17:04:54 -04:00
Charles Kerr
395b608dd5
refactor: more constexpr lookup tables (#38886)
* refactor: use constexpr lookup table in electron_api_web_contents.cc

* refactor: make KeyboardCodeFromStr() private

it is only used as a helper to KeyboardCodeFromStr()

* chore: savepoint

* chore: make lint happy

* fixup! refactor: make KeyboardCodeFromStr() private

* refactor: use constexpr lookup table in electron_url_loader_factory

* refactor: use constexpr lookup table in electron_api_tray

* refactor: use constexpr lookup table in web_contents_preferences.cc

* refactor: use constexpr lookup table in content_converter
2023-06-22 14:33:44 +02:00
electron-roller[bot]
1eb19f3078
chore: bump chromium to 116.0.5845.0 (main) (#38827)
* chore: bump chromium in DEPS to 116.0.5835.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5837.0

* chore: bump chromium in DEPS to 116.0.5839.0

* chore: bump chromium in DEPS to 116.0.5841.0

* chore: bump chromium in DEPS to 116.0.5843.0

* Update patches

CLs that affected printing.patch:
- 4616791: Refactor PrintViewManagerBase::PrintNow()
  https://chromium-review.googlesource.com/c/chromium/src/+/4616791
- 4602776: Make PrintNodeUnderContextMenu operation go through PrintViewManager
  https://chromium-review.googlesource.com/c/chromium/src/+/4602776

* 4506614: geolocation: Add LocationProvider::FillDiagnostics
https://chromium-review.googlesource.com/c/chromium/src/+/4506614

* chore: bump chromium in DEPS to 116.0.5845.0

* chore: update patches

* fixup! 4506614: geolocation: Add LocationProvider::FillDiagnostics https://chromium-review.googlesource.com/c/chromium/src/+/4506614

* 4609704: Remove gnome-keyring
https://chromium-review.googlesource.com/c/chromium/src/+/4609704

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2023-06-22 10:51:15 +02:00
Shelley Vohr
a00a25376d
fix: crash calling BrowserWindow.removeBrowserView() with destroyed webContents (#38842)
fix: crash calling removeBrowserView() with destroyed webContents

https://github.com/electron/electron/issues/37642
2023-06-21 15:20:54 -04:00
Michaela Laurencin
ce6fe040fe
fix: set minimize visibility true with enable (#38860) 2023-06-21 14:58:33 -04:00
Shelley Vohr
e73edb5481
feat: allow headers to be sent with session.downloadURL() (#38785) 2023-06-21 15:31:28 +02:00
Shelley Vohr
f6bbc34658
fix: set supported scale factors on startup (#38836) 2023-06-20 12:24:03 -04:00
Milan Burda
2b3902e526
refactor: use content::GlobalRenderFrameHostId (#38843)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-20 15:32:31 +02:00
Charles Kerr
97132ece33
refactor: use constexpr lookup tables in gin helper (#38818)
* feat: add gin_helper::FromV8WithLookup()

feat: add gin_helper::FromV8WithLowerLookup()

* refactor: use constexpr lookup table in gin Converters
2023-06-19 10:33:09 +02:00
Charles Kerr
41ab5f327f
refactor: remove unused InspectableWebContentsView::GetWebView() (#38799) 2023-06-16 00:44:19 -05:00
electron-roller[bot]
7219142a54
chore: bump chromium to 116.0.5833.0 (main) (#38809)
* chore: bump chromium in DEPS to 116.0.5833.0

* chore: update patches

* 4530656: Add DeviceLoginScreenWebHidAllowDevicesForUrls policy

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

* Split CertDatabase notifications between trust changes and client cert changes

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-06-15 16:37:01 -04:00
Charles Kerr
bf1ba4a857
refactor: constexpr lookup tables (#38771)
* refactor: use a constexpr lookup table in GetPathConstant()

* refactor: use a constexpr lookup table in SystemPreferences::GetColor()

* refactor: use a constexpr lookup table in SimpleURLLoaderWrapper::Create()
2023-06-14 17:00:46 -04:00
Charles Kerr
5ad8b4b7d1
chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
Charles Kerr
167c2b250e
refactor: use compile-time cli arg sets. (#38748)
We're currently building these on the heap with `std::set<std::string>`
but this can be a very small compile-time container instead.

Marking as 'refactor' rather than 'perf' since this isn't called often,
but moving from heap to compile-time is good and using this container
makes the code more readable.
2023-06-13 14:37:59 -05:00
Milan Burda
e37111edcc
build: remove enable_osr build flag (#38703)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-13 14:48:53 -04:00
electron-roller[bot]
80a3ba5c68
chore: bump chromium to 116.0.5829.0 (main) (#38726)
* chore: bump chromium in DEPS to 116.0.5823.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5825.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5827.0

* chore: update patches

* 4568811: Integrate Search Prefetch with Extensions.

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

* 4567511: [DevTools] Add recordCountHistogram API.

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

* 4507692: Delete base/guid.h

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

* 4589551: Convert some of /base to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4589551
Also:
4601769: Convert immersive mode controllers to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4601769

* [viz] Convert MaybeSizeInBytes() to take in SharedImageFormat

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

* 4564108: [BRP] Enable check_raw_ptr_fields for Mac

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

* chore: bump chromium in DEPS to 116.0.5828.0

* chore: bump chromium in DEPS to 116.0.5829.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-06-13 14:45:48 -04:00
Shelley Vohr
678d1aa37d
docs: clarify supported accelerator punctuation (#38740)
doc: clarify supported accelerator punctuation
2023-06-13 12:42:55 +02:00
Charles Kerr
ab49e98401
perf: prefer base::StringPiece over std::string for build-time strings (#38717)
* perf: use base::StringPiece in InclusionStatusToString()

The strings are all build-time constants and this is a private function

* perf: use base::StringPiece in ErrorCodeToString()

The strings are all build-time constants and this is a private function

* perf: use base::StringPiece in MessageSourceToString()

The strings are all build-time constants and this is a private function

* perf: use base::StringPiece in CursorTypeToString()

The strings are all build-time constants and this is a private function

* perf: use base::StringPiece in MediaStreamTypeToString()

The strings are all build-time constants and this is a private function

* perf: use base::StringPiece in ModifiersToArray()

The strings are all build-time constants and this is a private function

* perf: use base::StringPiece in WebFrameRenderer::MaybeGetRenderFrame()

The strings are all build-time constants and this is a private function
2023-06-12 09:55:22 +02:00
electron-roller[bot]
fd5e6fbc14
chore: bump chromium to 116.0.5817.0 (main) (#38465)
* chore: bump chromium in DEPS to 116.0.5793.3

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5795.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5797.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5799.0

* 4522192: [serial] Allow Bluetooth ports to be requested by service class ID. | https://chromium-review.googlesource.com/c/chromium/src/+/4522192

* 4545385: Create base:🍎:Owned[frameworktype], use it for gfx::NativeEvent | https://chromium-review.googlesource.com/c/chromium/src/+/4545385

* chore: bump chromium in DEPS to 116.0.5801.0

* chore: update patches

* 4562796: Use base:🍎:Owned[frameworktype] for ui::PlatformEvent | https://chromium-review.googlesource.com/c/chromium/src/+/4562796

* 4559790: Manual raw_ptr rewrite: //base | https://chromium-review.googlesource.com/c/chromium/src/+/4559790

* chore: bump chromium in DEPS to 116.0.5803.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5805.2

* chore: update patches

* 4547630: Move content/public/common/network_service_util.h to c/p/browser/ | https://chromium-review.googlesource.com/c/chromium/src/+/4547630

* 4510075: Adding extensions to network response experiment | https://chromium-review.googlesource.com/c/chromium/src/+/4510075

* 4566552: Auto-generate grd file for chrome://accessibility. | https://chromium-review.googlesource.com/c/chromium/src/+/4566552

* chore: bump chromium in DEPS to 116.0.5807.0

* chore: update patches

* 4533536: [Privacy Hub] Geolocation manager used directly | https://chromium-review.googlesource.com/c/chromium/src/+/4533536

* chore: patch out ARC support from /chrome/browser

4571955: Convert /chrome/browser to use ARC | https://chromium-review.googlesource.com/c/chromium/src/+/4571955

* chore: bump chromium in DEPS to 116.0.5809.2

* chore: bump chromium in DEPS to 116.0.5811.0

* chore: update patches

* 4573627: Adopt base::NoDestructor for KeyedService factories | https://chromium-review.googlesource.com/c/chromium/src/+/4573627

* 4576878: Reland "Shared Storage: Add mojo method for observing response headers" | https://chromium-review.googlesource.com/c/chromium/src/+/4576878

* chore: bump chromium in DEPS to 116.0.5813.0

* chore: update patches

* fixup! 4566552: Auto-generate grd file for chrome://accessibility. | https://chromium-review.googlesource.com/c/chromium/src/+/4566552

* chore: fix up lint

* test: (debug) use Promise.all in asan tests

* chore: manually roll DEPS to 116.0.5815.0

* chore: update patches

* 4585150: Convert /printing to use ARC | https://chromium-review.googlesource.com/c/chromium/src/+/4585150

* test: (asan) extend timeout, clean up debugging

* chore: remove ARC chromium patch

* chore: update patches after main sync

* 4546398: Convert /chrome/browser to use ARC | https://chromium-review.googlesource.com/c/chromium/src/+/4546398

* build: add chrome_lib_arc for chromium_src/BUILD.gn sources

* fixup! 4559790: Manual raw_ptr rewrite: //base | https://chromium-review.googlesource.com/c/chromium/src/+/4559790

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
2023-06-09 16:08:36 -07:00
Charles Kerr
a3448376a1
refactor: api web contents ownership (#38695)
* refactor: aggregate api::WebContents::exclusive_access_manager_ directly

* refactor: make WebContents::devtools_file_system_indexer_ scoped_refptr const

* refactor: make WebContents::file_task_runner_ scoped_refptr const

* refactor: make WebContents::print_task_runner_ scoped_refptr const
2023-06-09 15:28:11 -05:00
Samuel Maddock
e8fd5fd3a8
fix: WCO transparent background (#38693)
* fix: WCO transparency

* doc: wco color transparency

* fix: transparent buttons when calling setTitleBarOverlay
2023-06-09 09:57:57 -07:00
Charles Kerr
d95ae19edf
refactor: add SessionPreferences::CreateForBrowserContext() (#38656)
Copy the NativeWindowRelay::CreateForWebContents() idiom
to simplify SessionPreferences's constructor and lifecycle.
2023-06-09 11:20:43 -05:00
Milan Burda
05d39d8313
build: remove enable_run_as_node build flag (#38413)
* 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>
2023-06-08 16:40:08 -04:00
Charles Kerr
9d8da7839e
fix: dangling pointer warning when updating menus (#38643) 2023-06-08 09:29:32 -05:00
wgsheng
c8bdd014c8
fix: menu bar visibility when exiting full screen (#38599) 2023-06-08 12:19:34 +02:00
Shelley Vohr
5ee890fb6f
fix: reparenting UAF crash on macOS (#38603) 2023-06-08 12:18:37 +02:00
Shelley Vohr
9a9d8ae5ea
refactor: add ARC scaffolding for macOS (#38621) 2023-06-08 10:26:33 +02:00
Milan Burda
0294debc31
build: remove enable_picture_in_picture build flag (#38620)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-07 23:56:31 -07:00
Shelley Vohr
933544d449
chore: clean up ElectronPermissionManager (#38636)
chore: clean up ElectronPermissionManager
2023-06-07 23:55:36 -07:00
Charles Kerr
69790f4b2a
refactor: remove unused OffScreenRenderWidgetHostView fields (#38623) 2023-06-07 16:28:35 -05:00
Charles Kerr
5931f69f18
fix: sync api::Screen wrapper method sigs to upstream (#38597)
refactor: sync api::Screen getter sigs to upstream

ui::Display GetAllDisplays(), GetPrimaryDisplay(), GetDisplayMatching(),
and GetDisplayNearestPoint() methods are all const, so make our wrappers
const too.

ui::Display GetAllDisplays() returns a const reference, so make our
wrapper return a const reference too. This avoids creating a new
std::vector<display::Display> each time it's called.
2023-06-07 09:28:50 +02:00
zeeker999
28332c94bf
feat: Allow customizing the default math font (#38514) 2023-06-06 17:26:32 -04:00
Charles Kerr
5c1321b20a
refactor: remove redundant resizing strategy equality check (#38596)
* refactor: remove redundant resizing strategy equality check

Upstream already checks this.
2023-06-06 14:03:39 -05:00
Shelley Vohr
b2059f288a
fix: account for BrowserView bounds in setting autofill popup bounds (#38489) 2023-06-06 10:21:42 +02:00
Milan Burda
bb2ba35b51
refactor: use process_util.h helpers (#38574)
refactor: use process_util.h helpers
2023-06-06 17:19:13 +09:00
Shelley Vohr
8d689c565a
fix: file selection when disallowed on macOS (#38557) 2023-06-05 14:08:10 +02:00
Charles Kerr
83d023747c
refactor: use direct aggregation in NativeWindowViews (#38559)
* refactor: in NativeWindowViews, aggregate root_view_ directly

* refactor: in NativeWindowViews, aggregate keyboard_event_handler_ directly

* refactor: make NativeWindowClientView::window_ a raw_ref

Xref: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md\#non_owning-pointers-in-class-fields

Prefer const raw_ref<T> whenever the held pointer will never be null

* chore: make lint happy
2023-06-05 14:37:46 +09:00
Charles Kerr
05db963f87
chore: remove unused electron::api::View code (#38561)
chore: remove unused electron::api::View methods

Remove code that was added in 2c8dc9e but never used.
2023-06-03 10:40:44 -05:00
Charles Kerr
f247ca3f62
perf: avoid unnecessary base value clone (#38537) 2023-06-02 08:38:29 -05:00
Charles Kerr
c14f7b7d0b
refactor: remove unused switches (#38497)
* refactor: remove unused declaration of electron::kSHA1Certificate

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kSHA1MajorDescription

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kSHA1MinorDescription

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kCertificateError

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kValidCertificate

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kValidCertificateDescription

usage removed in 13a1d79

* refactor: remove unused declaration of electron::kSecureProtocol, kSecureProtocolDescription

usage removed in 497f5a1

* refactor: remove electron::options::kPreloadScripts

removed in bad8d5e0

* refactor: remove electron::options::kImageAnimationPolicy

removed in 385d0f5
2023-05-31 15:55:21 -04:00
Shelley Vohr
57147d1b8d
fix: navigator.connection not working as intended (#38491)
* fix: navigator.connection not working as intended

* chore: make network quality methods private
2023-05-31 11:06:25 -04:00
Shelley Vohr
663497dc6b
chore: make contentTracing.stopRecording() failure clearer (#38488)
chore: make contentTracing.stopRecording() failure clearer
2023-05-31 09:54:41 -04:00
Shelley Vohr
40e724e5dd
fix: DCHECK minimizing parent window with non-modal child (#38460) 2023-05-31 11:57:44 +02:00
John Kleinschmidt
b4ec363b3d
feat: add USB protected classes handler (#38263)
* feat: add USB protected classes handler

* chore: apply review suggestions

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

* chore: update docs

* chore: apply review suggestions

* update doc per suggestion

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-05-30 12:35:25 -04:00
Charles Kerr
0203bd3305
refactor: prefer base::Contains() over find() + end() (#38443)
* refactor: use base::Contains() in KeyWeakMap::Has()

* refactor: use base::Contains() in WebRequest::RequestFilter::MatchesType()

* refactor: use base::Contains() in BaseWindow::AddBrowserView()

* refactor: use base::Contains() in DeepFreeze()

* refactor: use base::Contains() in Clipboard::Read()

* Revert "refactor: use base::Contains() in BaseWindow::AddBrowserView()"
This reverts commit 60152359d3978451ebdd7c8eed602c2fb8a9cafa.

* refactor: use base::Contains() in BaseWindow::AddBrowserView()

* refactor: use base::Contains() in IsDevToolsFileSystemAdded()

* refactor: use base::Contains() in MessagePort::DisentanglePorts()

* refactor: use base::Contains() in PowerSaveBlocker::IsStarted()

* refactor: use base::Contains() in SpellCheckClient::OnSpellCheckDone()

* refactor: use base::Contains() in ShowTaskDialogWstr()

* refactor: use base::Contains() in PrintViewManagerElectron::ScriptedPrint()

* refactor: use base::Contains() in PrintViewManagerElectron::DidGetPrintedPagesCount()

* refactor: use base::Contains() in NativeWindow::AddDraggableRegionProvider()

* refactor: use base::Contains() in ElectronBindings::ActivateUVLoop()

* refactor: use base::Contains() in NativeWindowViews::IsVisibleOnAllWorkspaces()

* refactor: use base::Contains() in HidChooserController::OnDeviceAdded()

* refactor: use base::Contains() in ElectronSandboxedRendererClient::WillReleaseScriptContext()

* refactor: use base::Contains() in ElectronRendererClient::WillDestroyWorkerContextOnWorkerThread()

* refactor: use base::Contains() in GlobalShortcut::OnKeyPressed()
2023-05-30 10:28:43 +02:00
Shelley Vohr
56138d879e
fix: Windows FrameView always appearing inactive (#38468) 2023-05-28 18:39:13 -04:00
Charles Kerr
a20896f519
refactor: remove InspectableWebContents::GetAll() (#38442)
It is unused and also keeps a persistent std::list<>, so remove it.
2023-05-25 17:23:19 +09:00
Milan Burda
06cc9caeaa
build: remove enable_desktop_capturer flag (#38412)
feat: remove enable_desktop_capturer flag

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 15:32:31 -04:00
Milan Burda
2f8e68f8b3
chore: remove ViewsDelegate::IsWindowInMetro() override (#38409)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 20:00:52 +02:00
Shelley Vohr
16cd486356
fix: MediaDevices missing DisplayMediaInformation (#38390)
fix: MediaDevices missing DisplayMediaInformation
2023-05-24 11:17:08 -04:00