Commit graph

3305 commits

Author SHA1 Message Date
Charles Kerr
cee51785e1
refactor: inline simple getters, pt . 2 (#41254)
* refactor: inline AutofillPopup::line_count()

refactor: inline AutofillPopup::value_at()

refactor: inline AutofillPopup::label_at()

* refactor: inline NativeWindow::aspect_ratio()

refactor: inline NativeWindow::aspect_ratio_extra_size()

* refactor: inline BrowserProcessImpl::linux_storage_backend()

* refactor: inline ElectronMenuModel::sharing_item()

* refactor: inline Browser::badge_count()

* refactor: inline WebContents::is_guest()

refactor: inline InspectableWebContents::is_guest()

* refactor: inline InspectableWebContents::dev_tool_bounds()

* refactor: inline WebContents::type()
2024-02-09 10:29:14 +01:00
Cheng Zhao
92c5ff30a7
build: add flag for setting vendor version (#41247) 2024-02-06 14:23:17 -08:00
Charles Kerr
5686f88bd2
refactor: KeyWeakMap cleanup (#41242)
* refactor: make KeyWeakMap::KeyObject private

* perf: avoid redundant map lookup

* refactor: remove unused KeyWeakMap::Has()

* refactor: make KeyWeakMap dtor nonvirtual

no inheritance used, so no need for virtual dtor?

* chore: fix KeyWeakMap code comment

* refactor: use if statement in KeyWeakMap::Get()

* refactor: use better variable names in KeyWeakMap::Values()
2024-02-06 09:18:05 -06:00
Shelley Vohr
768ece6b54
feat: add BrowserWindow.isOccluded() (#38982)
feat: add BrowserWindow.isOccluded()
2024-02-06 11:30:35 +01:00
Charles Kerr
08236f7a9e
refactor: remove deprecated BrowserContext::ResourceContext (#41221)
* refactor: remove ResourceContext* arg from GetNSSCertDatabaseForResourceContext()

* refactor: remove ResourceContext* arg from CertificateManagerModel::GetCertDBOnIOThread()

* refactor: remove BrowserContext* arg from CertificateManagerModel::Create()

* refactor: remove unused forward declarations

* refactor: rename method to GetNSSCertDatabase()

* fixup! refactor: remove BrowserContext* arg from CertificateManagerModel::Create()

chore: remove unneeded line
2024-02-05 18:12:34 -06:00
Charles Kerr
2ebaebb603
refactor: replace use of deprecated base::JSONWriter::WriteJson() (#41215)
* refactor: use base::WriteJson() in ListValueToNSArray()

refactor: use base::WriteJson() in DictionaryValueToNSDictionary()

* refactor: use base::WriteJson() in Debugger::SendCommand()

* refactor: use base::WriteJson() in ScriptingExecuteScriptFunction::Run()

* refactor: use base::WriteJson() in HandleAccessibilityRequestCallback()
2024-02-02 12:25:58 -06:00
electron-roller[bot]
bccb7b572a
chore: bump chromium to 123.0.6272.0 (main) (#41130)
* chore: bump chromium in DEPS to 123.0.6265.0

* chore: bump chromium in DEPS to 123.0.6266.0

* chore: update feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch

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

reverts the revert *and* undoes the rewrites 😵

* chore: update chromium/disable_hidden.patch

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

minor manual intervention

* chore: update patches

* chore: Rename mouse lock to pointer lock

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

* refactor: fix use of newly-removed QuitCurrentWhenIdleClosureDeprecated()

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

Xref: https://github.com/electron/electron/pull/26022

This usage was added in #26022 as part of Wayland support and some
simple fiddles WfM with this patch on Wayland, but I'm unsure what
to be testing for & would like a second opinion on this commit.

* chore: bump chromium in DEPS to 123.0.6268.0

* chore: update patches

* 5235021: WebUI: Migrate accessibility and bluetooth internals to WebUIConfig
https://chromium-review.googlesource.com/c/chromium/src/+/5235021

* address review comment for 5196547

See: https://chromium-review.googlesource.com/c/chromium/src/+/5196547
Review comment: https://github.com/electron/electron/pull/41130#discussion_r1468973786

* 5075962: Introduce URLLoaderFactoryBuilder
https://chromium-review.googlesource.com/c/chromium/src/+/5075962

* chore: bump chromium in DEPS to 123.0.6270.0

* the missing semicolon strikes again

* chore: update chromium patches

* chore: update v8 patches

* 5242326: Some followup cleanup to Fuchia files in chrome | https://chromium-review.googlesource.com/c/chromium/src/+/5242326

* chore: bump chromium in DEPS to 123.0.6272.0

* chore: update patches

* chore: update patch after rebase

* 5247339: [Clipboard] Remove ClipboardContentType enum.

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

* Reland: "Allow content shell to enable the built-in DNS resolver"

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

* 5018206: [accessibility] Migrate to ScopedAccessibilityMode

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

* 5246669: [Default Nav Transition]Add GetBackForwardTransitionAnimationManager on WebContentsView | https://chromium-review.googlesource.com/c/chromium/src/+/5246669

* fix: move nut-js to optional spec deps (#41199)

* chore: bump chromium in DEPS to 123.0.6265.0

* chore: bump chromium in DEPS to 123.0.6266.0

* chore: update feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch

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

reverts the revert *and* undoes the rewrites 😵

* chore: update chromium/disable_hidden.patch

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

minor manual intervention

* chore: update patches

* chore: Rename mouse lock to pointer lock

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

* refactor: fix use of newly-removed QuitCurrentWhenIdleClosureDeprecated()

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

Xref: https://github.com/electron/electron/pull/26022

This usage was added in #26022 as part of Wayland support and some
simple fiddles WfM with this patch on Wayland, but I'm unsure what
to be testing for & would like a second opinion on this commit.

* chore: bump chromium in DEPS to 123.0.6268.0

* chore: update patches

* 5235021: WebUI: Migrate accessibility and bluetooth internals to WebUIConfig
https://chromium-review.googlesource.com/c/chromium/src/+/5235021

* address review comment for 5196547

See: https://chromium-review.googlesource.com/c/chromium/src/+/5196547
Review comment: https://github.com/electron/electron/pull/41130#discussion_r1468973786

* 5075962: Introduce URLLoaderFactoryBuilder
https://chromium-review.googlesource.com/c/chromium/src/+/5075962

* chore: bump chromium in DEPS to 123.0.6270.0

* the missing semicolon strikes again

* chore: update chromium patches

* chore: update v8 patches

* 5242326: Some followup cleanup to Fuchia files in chrome | https://chromium-review.googlesource.com/c/chromium/src/+/5242326

* chore: bump chromium in DEPS to 123.0.6272.0

* chore: update patches

* chore: update patch after rebase

* 5247339: [Clipboard] Remove ClipboardContentType enum.

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

* Reland: "Allow content shell to enable the built-in DNS resolver"

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

* 5018206: [accessibility] Migrate to ScopedAccessibilityMode

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

* 5246669: [Default Nav Transition]Add GetBackForwardTransitionAnimationManager on WebContentsView | https://chromium-review.googlesource.com/c/chromium/src/+/5246669

* fix: typescript error for optional dependency

(cherry picked from commit ea17105c8c01bd1f4c1df5e72190a687d92f93cc)

---------

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: clavin <clavin@electronjs.org>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Sam Maddock <smaddock@slack-corp.com>
2024-01-31 17:04:13 -06:00
Shelley Vohr
e4d5dc138f
fix: select-usb-device should respect filters option (#41166)
fix: select-usb-device should respect filters option
2024-01-31 09:53:30 -05:00
Charles Kerr
0e0a0bf724
fix: avoid potential CHECK() failure in DictionaryToRect() (#41160)
refactor: use gfx::Rect::Contains() instead of reinventing the wheel

perf: use base::Value::FindInt() to avoid redundant map lookups
2024-01-30 14:48:47 -06:00
Charles Kerr
08615b2d4e
refactor: simplify code by using base::Value::EnsureList() (#41162) 2024-01-30 14:48:09 -06:00
Shelley Vohr
90c7d6c823
fix: shouldPrintBackgrounds -> printBackground in webContents.printToPDF (#41161)
fix: shouldPrintBackgrounds -> printBackground
2024-01-30 14:47:55 -06:00
Shelley Vohr
fc917985ae
fix: ensure WebContents before checking draggable region (#41154)
fix: ensure WebContents before checking draggable region
2024-01-30 11:53:19 +01:00
Charles Kerr
ffec3127d5
refactor: inline simple getters (#41125) 2024-01-29 20:43:28 -06:00
Shelley Vohr
8104c7908a
fix: potential async_hooks crash in NotifyWindowRestore on Windows (#40576)
* fix: potential async_hooks crash in NotifyWindowRestore on Windows

* fix: don't use CallbackScope for Error objects
2024-01-26 12:53:07 -06:00
electron-roller[bot]
1a0991a9b9
chore: bump chromium to 122.0.6261.6 (main) (#40949)
* chore: bump chromium in DEPS to 122.0.6239.2

* chore: update patches

* refactor: extensions replaced StringPiece with string_view

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

* chore: bump chromium in DEPS to 122.0.6240.0

* chore: update patches

* chore: bump chromium in DEPS to 122.0.6241.5

* chore: bump chromium in DEPS to 122.0.6245.0

* chore: bump chromium in DEPS to 122.0.6247.0

* chore: bump chromium in DEPS to 122.0.6249.0

* chore: bump chromium in DEPS to 122.0.6251.0

* 5192010: Rename {absl => std}::optional in //chrome/

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

* 5109767: CodeHealth: Fix leaked raw_ptr in Linux ProcessSingleton

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

* 5105227: [media_preview] Show requested device in permission bubble

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

* chore: bump chromium in DEPS to 122.0.6253.0

* chore: update patches

* 5180720: Polish tiled browser window UI on Linux | https://chromium-review.googlesource.com/c/chromium/src/+/5180720

* chore: update patches

* chore: bump chromium in DEPS to 122.0.6255.0

* chore: update patches

* 5186276: [autopip] Make "allow once" per navigation | https://chromium-review.googlesource.com/c/chromium/src/+/5186276

* chore: bump chromium in DEPS to 122.0.6257.0

* chore: bump chromium in DEPS to 122.0.6259.0

* chore: update patches

* 5190661: Automated T* -> raw_ptr<T> rewrite "refresh" | https://chromium-review.googlesource.com/c/chromium/src/+/5190661

* 5206106: Make sure RenderFrameHosts are active when printing | https://chromium-review.googlesource.com/c/chromium/src/+/5206106

* 5202674: Reland "Automated T* -> raw_ptr<T> rewrite 'refresh'"

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

* fixup CodeHealth: Fix leaked raw_ptr in Linux ProcessSingleton

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

* fixup 5206106: Make sure RenderFrameHosts are active when printing

* Make legacy ToV8() helpers private to ScriptPromiseResolver, their only user

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

* fixup CodeHealth: Fix leaked raw_ptr in Linux ProcessSingleton

* fixup 5186276: [autopip] Make "allow once" per navigation

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

* chore: update patches after rebase

* chore: bump chromium in DEPS to 122.0.6260.0

* 5191363: Mark LOG(FATAL) [[noreturn]]

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

* fixup 5186276: [autopip] Make "allow once" per navigation

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

* fixup Make legacy ToV8() helpers private to ScriptPromiseResolver

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

* chore: update patches

* chore: bump chromium in DEPS to 122.0.6261.0

* chore: update patches

* chore: restore patch that was mistakenly removed

* 5181931: Improve LoginHandler (Part 9 / N)

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

* Dispatch SiteInstanceGotProcess() only when both process and site are set.

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

* 5171446: [AsyncSB] Pass navigation_id into CreateURLLoaderThrottles

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

* 5213708: Move DownloadTargetInfo into components/download

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

* extensions: Add a loader for Controlled Frame embedder scripts

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

* [CSC][Zoom] Add initial_zoom_level to DisplayMediaInformation

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

* chore: bump chromium in DEPS to 123.0.6262.0

* chore: bump chromium in DEPS to 122.0.6261.6

* fix: suppress clang -Wimplicit-const-int-float-conversion

* fixup 5191363: Mark LOG(FATAL) [[noreturn]] for Windows

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

* 5167921: Remove Widget::IsTranslucentWindowOpacitySupported

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

Also
5148392: PinnedState: Support pinned state in PlatformWindowState | https://chromium-review.googlesource.com/c/chromium/src/+/5148392

* fixup: 5180720: Polish tiled browser window UI on Linux

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

* 5170669: clipboard: Migrate DOMException constructors to RejectWith-

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

* 5178824: [Fullscreen] Record UKM data

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

* chore: update patches after rebase

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-01-25 12:46:30 -05:00
Charles Kerr
921da723b8
fix: dangling raw_ptr in OSRWHV destructor (#41088)
`delegated_frame_host_` holds a pointer to `delegated_frame_host_client_`.
Since `delegated_frame_host_client_` was being destroyed first, that
pointer was dangling in the OSRWHV destructor.

Also, make these two unique_ptr fields `const` since they point to the
same objects for the lifespan of the OSRWHV.
2024-01-25 10:15:32 +09:00
Shelley Vohr
3e6a038af7
fix: draggable regions not working (#41030)
* fix: draggable regions not working

* fix: only support app regions for main frame

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2024-01-25 09:12:54 +09:00
Charles Kerr
4164ef93ad
refactor: remove banned std::to_string() calls (#41087)
* refactor: do not use banned std::to_string() in ServiceWorkerContext::GetAllRunningWorkerInfo()

* refactor: do not use banned std::to_string() in REPORT_AND_RETURN_IF_FAILED()

* refactor: do not use banned std::to_string() in JSChunkedDataPipeGetter::OnWriteChunkComplete()

* refactor: do not use banned std::to_string() in SetCrashKey()

* chore: remove unused #include
2024-01-24 16:43:31 -06:00
Cheng Zhao
d13a93fb61
chore: remove node patches by using the preload feature (#41080) 2024-01-24 09:54:32 -06:00
Cheng Zhao
031d636823
fix: only remove hijackable envs from foreign parent (#41079) 2024-01-24 09:51:27 -06:00
Charles Kerr
1af9612edf
fix: ElectronBrowserContext::PartitionKey comparisons (#41055)
* fix: ElectronBrowserContext::PartitionKey comparisons

Use c++20 default comparisons to simplify + fix PartitionKey sorting:

- The equality operator is broken. `PartitionKey{"foo", false}` is both
  equal, to and less than, `PartitionKey{"foo", true}`

- For some keys, the same session can be retrieved via both `fromPath()`
  and `fromPartition()`. This use case was discussed and removed from
  the original PR after code review said "always returning different
  sessions feels lower maintenance." The current behavior is a bug that
  comes from the comparison operators not checking the keys' types.

Xref: 3f1aea9af9 (r1099745359)

Xref: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md#Default-comparisons-allowed

* fixup! fix: ElectronBrowserContext::PartitionKey comparisons
2024-01-23 09:41:44 -06:00
Guo Hao (Andrew) Lay
135c542555
feat: Windows integrity check (#40504)
* Add Windows integrity check feature into Electron

Co-authored-by: Weiyun Dai <weiyun.chn@gmail.com>

* Add integrity checker header file to sources

Co-authored-by: Weiyun Dai <weiyun.chn@gmail.com>

* Moved integrity checker after checking command line args

Co-authored-by: Weiyun Dai <weiyun.chn@gmail.com>

* Revert previous Windows integrity check commits (2379a60, 331cf3c, a3c47ec)

Co-authored-by: guohaolay <guohaolay@gmail.com>

* Implement asar header integrity for Windows platform.

Co-authored-by: guohaolay <guohaolay@gmail.com>

* Fix Archive::RelativePath() on Windows platform.

Co-authored-by: guohaolay <guohaolay@gmail.com>

* Address comments.

* Address Windows integrity check PR comments.

* Update absl::optional to std::optional.

* Fix spelling.

---------

Co-authored-by: Weiyun Dai <weiyun.chn@gmail.com>
Co-authored-by: Weiyun Dai <weiyund@amazon.com>
Co-authored-by: Weiyun Dai <35878488+WeiyunD@users.noreply.github.com>
2024-01-19 09:00:49 +13:00
Shelley Vohr
7e6fb97a2f
fix: crash when dialog.showMessageBoxSync with missing buttons (#40996)
* fix: crash when dialog.showMessageBoxSync missing buttons

* chore: feedback from review
2024-01-18 13:21:15 +01:00
Shelley Vohr
df7f07a8af
fix: modal rounding on nonmodal windows (#41003)
* fix: modal rounding on nonmodal windows

* chore: feedback from review
2024-01-18 09:59:54 +01:00
Tamás Zahola
f97d8719e6
fix: use HasStyleMask(NSWindowStyleMaskResizable) instead of IsResizable() for enabling/disabling window maximize button (#40994) 2024-01-17 18:23:41 +01:00
Charles Kerr
021592200e
refactor: remove deprecated ToInternalValue() (#40980)
* refactor: do not use deprecated ToInternalValue() in ElectronExtensionLoader::FinishExtensionLoad()

* refactor: do not use deprecated ToInternalValue() in NotificationPresenterWin::SaveIconToFilesystem()

* chore: rename temp variable to now_usec for clarity
2024-01-17 10:17:43 -05:00
Shelley Vohr
6803624576
fix: check for Node.js-created module when contextIsolation disabled (#40993) 2024-01-16 14:29:00 +01:00
Charles Kerr
b3e01220cb
refactor: fix deprecated base::Base64Encode() API calls (#40962)
* refactor: replace deprecated Base64Encode() usage in IWC::NetworkResourceLoader::OnDataReceived()

* refactor: replace deprecated Base64Encode() usage EncodeToken(const base::UnguessableToken& token)
2024-01-15 11:01:35 +01:00
Charles Kerr
80b220d214
refactor: use base::NoDestructor instead of base::LazyInstance (#40947)
* refactor: use NoDestructor for g_io_thread_application_locale

* refactor: use NoDestructor for ExtensionActionAPI::GetFactoryInstance()

* refactor: use NoDestructor for ElectronExtensionsClient::GetPermissionMessageProvider()

* refactor: use NoDestructor for feat_add_support_for_overriding_the_base_spellchecker_download_url.patch

* chore: remove unused #include

* fixup! refactor: use NoDestructor for ElectronExtensionsClient::GetPermissionMessageProvider()

make sure instance is static

* chore: remove unused #include "base/lazy_instance.h"
2024-01-12 14:50:29 +01:00
Shelley Vohr
d5d162b622
fix: InAppPurchase pre-emptive deallocation (#40938)
* fix: InAppPurchase pre-emptive deallocation

* test: try re-enabling IAP tests
2024-01-11 13:32:29 +01:00
electron-roller[bot]
2e4e6f10de
chore: bump chromium to 122.0.6236.2 (main) (#40871)
* chore: bump chromium in DEPS to 122.0.6223.0

* 5129828: Removes special cases for selenium-atoms dependencies.

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

* chore: fixup patch indices

* 5139789: Deduplicate BrowserContext's ResourceContext

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

* 5148579: Simplify SelectFileDialog::Listener

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

* 5134038: Code Health: Use string_view in base::i18n::BreakIterator::SetText

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

* 5137427: Code Health: Use string_view in SpellCheck::SpellCheckWord

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

* [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left

Notable things in this commit:

* refactors `__indirect_binary_left_foldable`, making it slightly
different (but equivalent) to _`indirect-binary-left-foldable`_, which
improves readability (a [patch to the Working Paper][patch] was made)
* omits `__cpo` namespace, since it is not required for implementing
niebloids (a cleanup should happen in 2024)
* puts tests ensuring invocable robustness and dangling correctness
inside the correctness testing to ensure that the algorithms' results
are still correct

[patch]: https://github.com/cplusplus/draft/pull/6734

* chore: bump chromium in DEPS to 122.0.6224.0

* 5154766: [Refresh 2023] [GTK] Fix gap above toolbar with fractional scaling

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

* chore: fixup patch indices

* 5094458: Remove extra CGColorSpace parameters from skia and ui helpers

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

* chore: bump chromium in DEPS to 122.0.6226.0

* chore: update patches

* chore: bump chromium in DEPS to 122.0.6227.0

* chore: update patches

* chore: bump chromium in DEPS to 122.0.6228.0

* chore: update patches

* chore: bump chromium in DEPS to 122.0.6230.0

* chore: bump chromium in DEPS to 122.0.6232.0

* chore: bump chromium in DEPS to 122.0.6234.0

* chore: bump chromium in DEPS to 122.0.6236.2

* chore: update patches

* fix: remove --disable-color-correct-renderering

Per https://electronhq.slack.com/archives/CB6CG54DB/p1698444047862459 it is not used any more and was never documented.

* chore: add WEB_PRINTING to content permission converter

Unused in non-cros so no need to document

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

* chore: Views is now vec<raw_ptr> instead of raw<T*>

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

* spec: add Iterator to global intrinsics

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2024-01-11 19:33:40 +13:00
Charles Kerr
f36ceae024
chore: migrate base::StringPiece to std::string_view (#40915)
* chore: migrate from base::StringPiece to std::string_view in keyboard_util.cc

* chore: migrate from base::StringPiece to std::string_view in error_thrower.cc

* chore: migrate from base::StringPiece to std::string_view in electron_api_web_contents.cc

* chore: migrate from base::StringPiece to std::string_view in gin_helper/dictionary.h

* chore: migrate from base::StringPiece to std::string_view in electron_api_url_loader.cc

* chore: phase out internal use of base:::StringPiece

`base::StringPiece` is being phased out upstream. Its code has been
removed upstream and it's just a typedef for `std::string_view`.

They haven't removed the typedef yet, so this PR tries to get ahead
of future breakage by migrating "internal" use (i.e. leaving alone the
places where the `base::StringPiece` name is coming from an upstream
method that we override).

Xref: https://bugs.chromium.org/p/chromium/issues/detail?id=691162

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

Xref: https://docs.google.com/document/d/1d4RnD1uAE2t4iANR0nXy82ASIPGsPuw2mpO6v6T7JKs
2024-01-10 19:00:37 -06:00
Milan Burda
892c9d78a3
chore: replace absl::optional<T> with std::optional<T> (#40928)
* chore: replace absl::optional<T> with std::optional<T>

* IWYU
2024-01-10 16:23:35 -06:00
Charles Kerr
fac964ac0d
refactor: migrate deprecated LazyInstance code to NoDestructor (#40927)
* refactor: do not use deprecated NoDestructor in javascript_environment.cc

* refactor: do not use deprecated NoDestructor in window_list.cc
2024-01-10 14:01:49 -06:00
Shelley Vohr
c184b93fc5
fix: crash using powerMonitor before ready event (#40888)
* fix: crash using powerMonitor before ready event

* refactor: continue using DBusBluezManagerWrapperLinux
2024-01-09 09:41:42 +01:00
Charles Kerr
7b4d490bfe
perf: use fixed-size arrays for the font cache (#40898)
refactor: use fixed-size arrays for the font cache

Since we know at compile time which [family x script] combos we want to
cache, we can hold the cache in fixed std::arrays instead of in nested
std::unordered_maps.
2024-01-08 10:31:02 +01:00
Calvin
37630a6128
fix: wide string concatenation (#40892)
* fix: wide string concatenation

* Use wstring_views to keep length in context

* forgot a space, oopsies
2024-01-07 22:02:20 -08:00
Tamás Zahola
cc1b64e01c
fix: macOS maximize button shouldn't be disabled just because the window is non-fullscreenable (#40705)
* fix: macOS maximize button shouldn't be disabled just because the window is non-fullscreenable

* add test

* fix test by enabling maximize button if `resizable && (maximizable || fullscreenable)` instead of `(resizable && maximizable) && fullscreenable`
2024-01-05 12:15:35 -05:00
Charles Kerr
22970f573b
perf: use flat_set, flat_map for small, trivially-moved containers (#40817)
* refactor: use base::flat_map in ElectronMenuModel

* refactor: use base::flat_map in BuildSubmenuFromModel()

* refactor: use base::flat_map in GetDialogsMap()

* refactor: use base::flat_map in DesktopCapturer

* refactor: use base::flat_map, flat_set in ElectronBrowserClient

* refactor: use base::flat_map in ProxyingURLLoaderFactory

* refactor: use base::flat_map in MapToCommonId()

* refactor: use base::flat_map for g_map_id

* refactor: use base::flat_map for ViewsDelegate::AppbarAutohideEdgeMap

* refactor: use base::flat_map for App::app_metrics_

* refactor: use base::flat_map for PowerSaveBlocker::wake_lock_types_

* refactor: use base::flat_map for NativeImage::hicons_

* refactor: use base::flat_map for MenuViews::menu_runners_

* refactor: use base::flat_map for WebViewManager::web_contents_embedder_map_

* refactor: use base::flat_map for InspectableWebContents::extensions_api_

* refactor: use base::flat_set for libnotify GetServerCapabilities()

* refactor: use base::flat_set for InspectableWebContents::loaders_

* refactor: use base::flat_set for ElectronRendererClient::environments_

refactor: use base::flat_set for ElectronRendererClient::injected_frames_

* refactor: use base::flat_set for WebWorkerObserver::environments_
2024-01-05 12:18:31 +01:00
Brandon Fowler
5086071294
feat: add transparent webpreference to webview (#40301)
* feat: add transparent option to WebContents

* feat: add transparent attribute to webview

* test: add tests for webview transparent attribute

* docs: add transparent attribute to webview docs

* fix: run tests on macOS only

* refactor: remove unneeded html tag

* fix: only apply transparent option to guests

* refactor: correct comment

* refactor: use opaque instead

Retains current webview behaviour by default.

* fix: correct variable name to guest_opaque_

* refactor: use transparent webpreference

* docs: remove unused web preference

* fix: uncomment condition for transparency test

* docs: converted to list format and linked to MDN

* fix: make webviews transparent by default again

* fix: rebase error

---------

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-05 13:00:27 +09:00
Devraj Mehta
8c71e2adc9
feat: add net module to utility process (#40017)
* chore: initial prototype of net api from utility process

* chore: update url loader to work on both browser and utility processes

* chore: add net files to utility process bundle

* chore: re-add app ready check but only on main process

* chore: replace browser thread dcheck's with sequence checker

* refactor: move url loader from browser to common

* refactor: move net-client-request.ts from browser to common

* docs: add utility process to net api docs

* refactor: move net module app ready check to browser only

* refactor: switch import from main to common after moving to common

* test: add basic net module test for utility process

* refactor: switch browser pid with utility pid

* refactor: move electron_api_net from browser to common

* chore: add fetch to utility net module

* chore: add isOnline and online to utility net module

* refactor: move net spec helpers into helper file

* refactor: break apart net module tests

Adds two additional net module test files: `api-net-session-spec.ts` for
tests that depend on a session being available (aka depend on running on
the main process) and `api-net-custom-protocols-spec.ts` for custom
protocol tests. This enables running `api-net-spec.ts` in the utility
process.

* test: add utility process mocha runner to run net module tests

* docs: add utility process to net module classes

* refactor: update imports in lib/utility to use electron/utility

* chore: check browser context before using in main process

Since the browser context supplied to the SimpleURLLoaderWrapper can now
be null for use in the UtilityProcess, adding a null check for the main
process before use to get a more sensible error if something goes wrong.

Co-authored-by: Cheng Zhao <github@zcbenz.com>

* chore: remove test debugging

* chore: remove unnecessary header include

* docs: add utility process net module limitations

* test: run net module tests in utility process individually

* refactor: clean up prior utility process net tests

* chore: add resolveHost to utility process net module

* chore: replace resolve host dcheck with sequence checker

* test: add net module tests for net.resolveHost

* docs: remove utility process limitation for resolveHost

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2024-01-04 16:20:37 -05:00
Charles Kerr
f229201f41
refactor: make NativeWindow getter methods const (#40804)
* refactor: make NativeWindow getter methods const

* fixup! refactor: make NativeWindow getter methods const

make GetZOrderLevel() const

* fixup! refactor: make NativeWindow getter methods const

fix oops
2024-01-04 09:51:59 -06:00
Jeremy Rose
84ba0c6c7d
fix: BrowserView and <webview> should be transparent by default (#40866) 2024-01-04 10:04:56 -05:00
Cheng Zhao
dfce1a9eb4
fix: ignore all NODE_ envs from foreign parent in node process (#40770)
* fix: ignore all NODE_ envs from foreign parent

* fix: recognize ad-hoc signed binary
2024-01-04 16:34:08 +09:00
electron-roller[bot]
8c89137ecd
chore: bump chromium to 122.0.6194.0 (main) (#40750)
* chore: bump chromium in DEPS to 122.0.6180.0

* chore: update render_widget_host_view_base.patch

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

minor manual changes to match upstream changes

* chore: update printing.patch

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

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

Update patch to upstream changes in print_view_manager_base.cc.
CC @codebytere for 👀

* chore: update feat_add_onclose_to_messageport.patch

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

no manual changes; patch applied with fuzz 1

* chore: update build_do_not_depend_on_packed_resource_integrity.patch

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

minor manual changes to match upstream changes

* chore: update port_autofill_colors_to_the_color_pipeline.patch

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

no manual changes; patch applied with fuzz 2

* chore: update revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch

Xref: https://chromium-review.googlesource.com/c/v8/v8/+/5076902
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/5096253

The `bailout_value` variable, which allowed us to fail gracefully in
these macros, has been removed upstream. This raises the temperature
on https://github.com/electron/electron/issues/40741 ...

Since we don't have a bailout value, return a default-constructed
instance of whatever the return type is of the function that invokes
the macro.

* Remove performActionOnRemotePage

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

It appears it is not used by anything within Chromium or outside.

* perf: in SubmenuButton ctor, move() the PressedCallback

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

The copy construtor is more expensive and has been removed upstream

* chore: update constructor call for ElectronExtensionsRendererClient::dispatcher_

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

* chore: handle CAPTURED_SURFACE_CONTROL in Converter<blink::PermissionType>::ToV8()

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

* chore: e patches all

* chore: bump chromium to 122.0.6181.0

* chore: e patches all

* refactor: Add lookup for per-RenderFrame SpellCheckProvider

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

Previously we could pass a routing ID into the spellcheck methods.
This ID arg has been replaced with a SpellCheckHost& arg.

We can get the SpellCheckHost from an accessor in SpellCheckProvider,
which was already being created on a per-render-frame basis in
RenderClientBase.

This commit adds a RenderFrame-to-SpellCheckProvider accessor
in RenderClientBase so that it can be used to get that needed
SpellCheckHost.

* chore: make lint happy

* chore: restore the will_cause_resize arg to WebContents::ExitFullscreen

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

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

upstream reverted this change

* chore: bump chromium in DEPS to 122.0.6182.0

* chore: update patches

* chore: fix virtual function names that were renamed upstream

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

* chore: handle new blink::PermissionType::SMART_CARD in PermissionType converter

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

* chore: node script/gen-libc++-filenames.js

* fixup! chore: update build_do_not_depend_on_packed_resource_integrity.patch

* chore: remove revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch

The previous experiment of removing the DCHECK in 35093783 was a huge
failure. We either need to either:

A) use upstream as-is and fix the DCHECK failure, or
B) revert https://chromium-review.googlesource.com/c/v8/v8/+/5076902 too
C) find some other workaround

This commit is the first half of option A, removing the patch to use
upstream as-is.

* chore: bump chromium in DEPS to 122.0.6184.0

* chore: bump chromium in DEPS to 122.0.6186.0

* chore; update mas_avoid_private_macos_api_usage.patch.patch

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

minor manual changes to match upstream changes

* chore: update build_do_not_depend_on_packed_resource_integrity.patch

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

minor manual changes to match upstream changes

* chore: update fix_move_autopipsettingshelper_behind_branding_buildflag.patch

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

no manual changes; patch applied with fuzz 1

* chore: e patches all

* chore: add refactor_update_node-platform_to_match_v8-platform_api_changes.patch

* chore: bump chromium in DEPS to 122.0.6188.0

* chore: bump chromium in DEPS to 122.0.6190.0

* chore: bump chromium in DEPS to 122.0.6192.0

* chore: bump chromium in DEPS to 122.0.6194.0

* Remove an unnecessary DCHECK which causes Lacros to crash.

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

* [FixIt Week] Add shared regular profile function that includes ash

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

* Simplify the PrintManagerHost::ScriptedPrint() call

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

* [local compile hints] Add tests

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

* chore: update patches

* fixup! chore: add refactor_update_node-platform_to_match_v8-platform_api_changes.patch

* chore: node script/gen-libc++-filenames.js

* Remove //ui/ozone/buildflags.h

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

* fixup! Remove //ui/ozone/buildflags.h

* fixup! Remove //ui/ozone/buildflags.h

* chore: update patches

* fixup! refactor: Add lookup for per-RenderFrame SpellCheckProvider

* fixup! Remove //ui/ozone/buildflags.h

* Add permission policy verification in PermissionControllerImpl

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

* fix: ensure spellcheck interface is registered for frame

* [exceptions] Unify pending and scheduled exceptions

https://chromium-review.googlesource.com/c/v8/v8/+/5050065

* fix: dchecks in node.js tests

* fix: try adding termination check

* chore: document breaking iframe change

---------

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: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-01-03 09:52:49 +01:00
Jeremy Rose
be4e4ff11b
fix: make grant_file_protocol_extra_privileges fuse also block CORS fetches (#40801) 2024-01-02 13:06:33 -08:00
Bruno Henrique da Silva
a208d45aca
fix: titlebar incorrectly displayed on frameless windows (#40749)
* fix: titlebar incorrectly displayed on frameless windows

* fix: enable transparency for Mica windows

* Refactor ShouldWindowContentsBeTransparent

---------

Co-authored-by: clavin <clavin@electronjs.org>
2024-01-02 13:59:47 -05:00
Charles Kerr
7995c56fb0
refactor: use a FixedFlatMap for v8 converting ui::MenuSourceType (#40786) 2023-12-20 17:44:17 -06:00
Jeremy Rose
15c6014324
feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
electron-roller[bot]
08a51f3339
chore: bump chromium to 121.0.6159.0 (main) (#40632)
* chore: bump chromium in DEPS to 121.0.6154.0

* chore: bump chromium in DEPS to 121.0.6155.0

* fix patches

* chore: update patches

* patch out reference to GetOcclusionTracker

* un-flag PIPOcclusionTracker

* chore: bump chromium in DEPS to 121.0.6157.0

* fix conflicts

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

* add PIP occlusion tracker sources to chromium_src

* 5037591: Replace feature_list's Initialize* methods with Init*.

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

* 4811903: Move //content/browser/renderer_host/input/synthetic_gesture_controller to //content/common/input

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

* 4917953: usb: Add usb-unrestricted to permission policy

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

* 5072395: Remove unused `creation_context` parameter from blink/public APIs

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

* 5052035: [X11] Change AtomCache from a singleton to owned by Connection

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

* fix v8/.patches

* node script/gen-libc++-filenames.js

* 5035771: Remove the SetImage method of ImageButton

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

* fixup! 5052035: [X11] Change AtomCache from a singleton to owned by Connection

* fixup! 5035771: Remove the SetImage method of ImageButton

* chore: bump chromium in DEPS to 121.0.6159.0

* 4505903: [Extensions] Add lastAccessed property to chrome.tabs.Tab

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

* update patches

* don't duplicate tabs API types

this causes weird memory bugs if the two get out of sync

* fix UAF in TrayIconCocoa

not sure why this is popping up just now ... this has been broken for ages afaict

* Revert "don't duplicate tabs API types"

This reverts commit 80dff2efaa1297e5c191b2c69648099d6665dbff.

This is failing tests with extensions API schema check failures, so
revert for now. we'll fix it later.

* revert v8 change causing node crashes

* chore: reduce diffs in revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-12-11 14:58:26 -06:00
Cheng Zhao
cb0da6ff34
fix: prevent node mode to be used as script runner by other apps (#40579) 2023-12-06 11:23:54 +09:00
Cheng Zhao
9aa73abe78
feat: enable code cache for custom protocols (#40544) 2023-12-06 11:22:41 +09:00
Jeremy Rose
85bc005cd6
refactor: move JS dialog handling to JS (#40598) 2023-12-05 17:36:23 -08:00
Shelley Vohr
10a165a9ff
fix: webview zoom level persistence on navigation (#40650) 2023-12-04 10:39:20 -05:00
Albert Xing
3609fc7402
fix: clean up devtools frontend_host on webcontents destroy (#40666)
* fix: clean up devtools frontend_host on destroy

* chore: use IsInPrimaryMainFrame instead of IsInMainFrame

* test: add a test for re-opening devtools
2023-12-01 11:37:52 -08:00
Shelley Vohr
9c94fd7afb
chore: upgrade to Node.js v20 (#40545)
* chore: upgrade to Node.js v20

* src: allow embedders to override NODE_MODULE_VERSION

https://github.com/nodejs/node/pull/49279

* src: fix missing trailing ,

https://github.com/nodejs/node/pull/46909

* src,tools: initialize cppgc

https://github.com/nodejs/node/pull/45704

* tools: allow passing absolute path of config.gypi in js2c

https://github.com/nodejs/node/pull/49162

* tools: port js2c.py to C++

https://github.com/nodejs/node/pull/46997

* doc,lib: disambiguate the old term, NativeModule

https://github.com/nodejs/node/pull/45673

* chore: fixup Node.js BSSL tests

* https://github.com/nodejs/node/pull/49492
* https://github.com/nodejs/node/pull/44498

* deps: upgrade to libuv 1.45.0

https://github.com/nodejs/node/pull/48078

* deps: update V8 to 10.7

https://github.com/nodejs/node/pull/44741

* test: use gcUntil() in test-v8-serialize-leak

https://github.com/nodejs/node/pull/49168

* module: make CJS load from ESM loader

https://github.com/nodejs/node/pull/47999

* src: make BuiltinLoader threadsafe and non-global

https://github.com/nodejs/node/pull/45942

* chore: address changes to CJS/ESM loading

* module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999)
* lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652)

* bootstrap: optimize modules loaded in the built-in snapshot

https://github.com/nodejs/node/pull/45849

* test: mark test-runner-output as flaky

https://github.com/nodejs/node/pull/49854

* lib: lazy-load deps in modules/run_main.js

https://github.com/nodejs/node/pull/45849

* url: use private properties for brand check

https://github.com/nodejs/node/pull/46904

* test: refactor `test-node-output-errors`

https://github.com/nodejs/node/pull/48992

* assert: deprecate callTracker

https://github.com/nodejs/node/pull/47740

* src: cast v8::Object::GetInternalField() return value to v8::Value

https://github.com/nodejs/node/pull/48943

* test: adapt test-v8-stats for V8 update

https://github.com/nodejs/node/pull/45230

* tls: ensure TLS Sockets are closed if the underlying wrap closes

https://github.com/nodejs/node/pull/49327

* test: deflake test-tls-socket-close

https://github.com/nodejs/node/pull/49575

* net: fix crash due to simultaneous close/shutdown on JS Stream Sockets

https://github.com/nodejs/node/pull/49400

* net: use asserts in JS Socket Stream to catch races in future

https://github.com/nodejs/node/pull/49400

* lib: fix BroadcastChannel initialization location

https://github.com/nodejs/node/pull/46864

* src: create BaseObject with node::Realm

https://github.com/nodejs/node/pull/44348

* src: implement DataQueue and non-memory resident Blob

https://github.com/nodejs/node/pull/45258

* sea: add support for V8 bytecode-only caching

https://github.com/nodejs/node/pull/48191

* chore: fixup patch indices

* gyp: put filenames in variables

https://github.com/nodejs/node/pull/46965

* build: modify js2c.py into GN executable

* fix: (WIP) handle string replacement of fs -> original-fs

* [v20.x] backport vm-related memory fixes

https://github.com/nodejs/node/pull/49874

* src: make BuiltinLoader threadsafe and non-global

https://github.com/nodejs/node/pull/45942

* src: avoid copying string in fs_permission

https://github.com/nodejs/node/pull/47746

* look upon my works ye mighty

and dispair

* chore: patch cleanup

* [api] Remove AllCan Read/Write

https://chromium-review.googlesource.com/c/v8/v8/+/5006387

* fix: missing include for NODE_EXTERN

* chore: fixup patch indices

* fix: fail properly when js2c fails in Node.js

* build: fix js2c root_gen_dir

* fix: lib/fs.js -> lib/original-fs.js

* build: fix original-fs file xforms

* fixup! module: make CJS load from ESM loader

* build: get rid of CppHeap for now

* build: add patch to prevent extra fs lookup on esm load

* build: greatly simplify js2c modifications

Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c

* chore: update to handle moved internal/modules/helpers file

* test: update @types/node test

* feat: enable preventing cppgc heap creation

* feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler

* fix: no cppgc initialization in the renderer

* gyp: put filenames in variables

https://github.com/nodejs/node/pull/46965

* test: disable single executable tests

* fix: nan tests failing on node headers missing file

* tls,http2: send fatal alert on ALPN mismatch

https://github.com/nodejs/node/pull/44031

* test: disable snapshot tests

* https://github.com/nodejs/node/pull/47887
* https://github.com/nodejs/node/pull/49684
* https://github.com/nodejs/node/pull/44193

* build: use deps/v8 for v8/tools

Node.js hard depends on these in their builtins

* test: fix edge snapshot stack traces

https://github.com/nodejs/node/pull/49659

* build: remove js2c //base dep

* build: use electron_js2c_toolchain to build node_js2c

* fix: don't create SafeSet outside packageResolve

Fixes failure in parallel/test-require-delete-array-iterator:

=== release test-require-delete-array-iterator ===
Path: parallel/test-require-delete-array-iterator
node:internal/per_context/primordials:426
    constructor(i) { super(i); } // eslint-disable-line no-useless-constructor
                     ^

TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
    at new Set (<anonymous>)
    at new SafeSet (node:internal/per_context/primordials:426:22)

* fix: failing crashReporter tests on Linux

These were failing because our change from node::InitializeNodeWithArgs to
node::InitializeOncePerProcess meant that we now inadvertently called
PlatformInit, which reset signal handling. This meant that our intentional
crash function ElectronBindings::Crash no longer worked and the renderer process
no longer crashed when process.crash() was called. We don't want to use Node.js'
default signal handling in the renderer process, so we disable it by passing
kNoDefaultSignalHandling to node::InitializeOncePerProcess.

* build: only create cppgc heap on non-32 bit platforms

* chore: clean up util:CompileAndCall

* src: fix compatility with upcoming V8 12.1 APIs

https://github.com/nodejs/node/pull/50709

* fix: use thread_local BuiltinLoader

* chore: fixup v8 patch indices

---------

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 09:51:35 -05:00
Tamás Zahola
39ee94089a
fix: add missing set_wants_to_be_visible(true) to NativeWindowMac::ShowInactive() (#40546)
* fix: add missing set_wants_to_be_visible(true) to NativeWindowMac::ShowInactive()

* add test
2023-11-30 12:43:22 +01:00
electron-roller[bot]
5c7579ab1c
chore: bump chromium to 121.0.6147.0 (main) (#40523)
* chore: bump chromium in DEPS to 121.0.6128.0

* build: update patches

* refactor: remove instrumentation from extensions code

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

* refactor: modernization of tabs_api

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

* fix: add RecordHover and RecordDrag handlers

* build: add missing pdf files

* chore: bump chromium in DEPS to 121.0.6129.0

* chore: bump chromium in DEPS to 121.0.6131.0

* chore: update patches

* refactor: remove will_cause_resize from ExitFullscreen

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

* chore: add missing std converter include

Before these were being inferred as std::string implicitly, not anymore
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5029573

* chore: Unwrap UserScriptList from unique_ptrs

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

* refactor: add PDF internal id into PDF stream info

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

* refactor: add metadata to view classes

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

* chore: run lint --fix

* chore: update libc++ filenames

* chore: clean up menubar

* chore: update patches after main merge

* 5010979: Replace base::WStringPiece usage with std::wstring_view | https://chromium-review.googlesource.com/c/chromium/src/+/5010979

* chore: bump chromium in DEPS to 121.0.6142.0

* chore: update patches

* 4969574: Refactor NativeDesktopMediaList | https://chromium-review.googlesource.com/c/chromium/src/+/4969574

* 5031192: [blink] Create new blink test suite that doesn't create blink Isolate | https://chromium-review.googlesource.com/c/chromium/src/+/5031192

* chore: update v8/devtools patches

* 5040722: [base] Replace MakeFixedFlatTreeSorted with tag type overloads | https://chromium-review.googlesource.com/c/chromium/src/+/5040722

* 5026474: Add --generate-pdf-document-outline | https://chromium-review.googlesource.com/c/chromium/src/+/5026474

* 5024297: Change parameter of CheckMediaAccessPermission from GURL to URL::Origin | https://chromium-review.googlesource.com/c/chromium/src/+/5024297

* 5034217: [RWS] Remove CanonicalCookie::IsSameParty method | https://chromium-review.googlesource.com/c/chromium/src/+/5034217

* 5037192: Rewrite usage of RenderFrame::GetRoutingID | https://chromium-review.googlesource.com/c/chromium/src/+/5037192

* 5041802: Reland "Incorporate policy override for OOPPD feature" | https://chromium-review.googlesource.com/c/chromium/src/+/5041802

* chore: bump chromium in DEPS to 121.0.6143.0

* chore: bump chromium in DEPS to 121.0.6145.0

* chore: update chromium patches

* 5049986: Use std::unique_ptr for MenuItemView::submenu_ member. | https://chromium-review.googlesource.com/c/chromium/src/+/5049986

* 5041595: picture-in-picture: Add PictureInPictureOcclusionTracker | https://chromium-review.googlesource.com/c/chromium/src/+/5041595

* chore: update all patches

* chore: bump chromium in DEPS to 121.0.6147.0

* chore: update patches

* 5051069: Use base::FunctionRef for BrowserPluginGuestManager. | https://chromium-review.googlesource.com/c/chromium/src/+/5051069

* 5057330: [base] Remove base::Erase()/base::EraseIf() overloads for std::set | https://chromium-review.googlesource.com/c/chromium/src/+/5057330

* fixup! 5041802: Reland "Incorporate policy override for OOPPD feature" | https://chromium-review.googlesource.com/c/chromium/src/+/5041802

* 5017518: Remove PPAPI if NaCl is disabled | https://chromium-review.googlesource.com/c/chromium/src/+/5017518

* 5002232: [DevTools] Console Insights: move from build flag to Feature API | https://chromium-review.googlesource.com/c/chromium/src/+/5002232

* 4970322: [X11] Move utils into x11::Connection | https://chromium-review.googlesource.com/c/chromium/src/+/4970322

* 5048950: Let MenuModelAdapter::CreateMenu return a std::unique_ptr<>. | https://chromium-review.googlesource.com/c/chromium/src/+/5048950

* chore: update libcxx filenames

* use Context::Scope in RunScriptsAtDocument{Start,End}

* 4775128: content: Reuse CC instance for main frame navigations

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

* also wrap WebWorkerObserver::ContextWillDestroy with Context::Scope

* set LIBCPP_HARDENING_MODE

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2023-11-28 13:40:12 -08:00
Felix Rieseberg
f0f027c06d
fix: Use activateIgnoringOtherApps for non-panels (#40570)
Use activateIgnoringOtherApps for non-panels
2023-11-27 12:58:46 -05:00
Shelley Vohr
e78ce82641
fix: do not call after() async_hook for asyncId 0 (#40574)
fix: do not call after() async_hook for asyncId 0
2023-11-22 17:37:40 +01:00
Tomasz
3340bc1bf9
fix: maximized window bounds when toggle setResizable (#40503) 2023-11-22 15:21:18 +09:00
Samuel Attard
d6bb9b40b0
feat: add webUtils module with getPathForFile method (#38776)
* feat: add blinkUtils module with getPathForFile method

This is designed to replace the File.path augmentation
we currently have in place to allow apps to get the filesystem
path for a file that blink has a representation of.

File.path is non-standard and messes with certain websites, using
a method like this is effectively 0-cost and removes one of the final
deviations we have with web standards.

* add error

* refactor: update per PR feedback

* chore: update patches

* oops

* chore: update patches

* chore: update patches

* feat: add blinkUtils module with getPathForFile method

This is designed to replace the File.path augmentation
we currently have in place to allow apps to get the filesystem
path for a file that blink has a representation of.

File.path is non-standard and messes with certain websites, using
a method like this is effectively 0-cost and removes one of the final
deviations we have with web standards.

* add error

* refactor: update per PR feedback

* chore: update patches

* oops

* chore: update patches

* chore: update patches

* chore: update patches

* fix: provide isolate to WebBlob::FromV8Value

* chore: add tests

* build: fix depshash mismatch on arm64 macOS

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2023-11-20 15:59:36 -08:00
Xie Jingyi
2c03b8fd6b
fix: ShowItemUsingFileManager should escape path in Linux (#40527) 2023-11-20 09:00:56 +09:00
Shelley Vohr
471449d9f6
feat: add/update missing Display properties (#40497) 2023-11-17 10:43:04 +01:00
Shelley Vohr
371bca69b6
refactor: use new extensions Messaging API IPC (#40511)
* refactor: use new extensions Messaging API IPC

Refs CRBUG:993189

Incorporates changes from:
* Bind ServiceWorker associated interfaces on Worker Thread (CL:4929154)
* [extensions] Move WakeEventPage to mojom::RendererHost (CL:4902564)
* [extensions] Convert Extension Messaging APIs over to mojo (CL:4947890)
* [extensions] Port GetMessageBundle over to mojom (CL:4956841)

* 5008635: [extensions] Bind the mojo interfaces to the frame instance

https://chromium-review.googlesource.com/c/chromium/src/+/5008635
2023-11-15 15:30:47 +01:00
Samuel Maddock
088affd4a4
fix: emit will-navigate for links in chrome: pages (#40390)
* fix: emit will-navigate for links in chrome: pages

* test: will-navigate emitted from chrome: pages

* Update shell/browser/electron_navigation_throttle.cc

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

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-11-14 14:09:44 -08:00
electron-roller[bot]
0e4e9dc98c
chore: bump chromium to 121.0.6116.0 (main) (#40490)
* chore: bump chromium in DEPS to 121.0.6116.0

* chore: update patches

* Update webIDL to support close event.

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

* Remove uses of implicit conversion of ScopedTypeRef

Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1495439

* Add GlobalRenderFrameHostToken

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

* [DevTools] Console Insights: move from build flag to Feature API

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

* [Extensions] Use script serialization in scripting API

Refs https://chromium-review.googlesource.com/c/chromium/src/+/4968680
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4998265

* [api] Remove AllCan Read/Write

https://chromium-review.googlesource.com/c/v8/v8/+/5006387

* chore: update libcxx files

* chore: address nan compilation error

* spec: use nan dependency from third_party

It is easier to get fixes for spec modules depending on nan

* ci: publish nan artifact for woa

* fix: bad patch update

* chore: update nan resolution

* Revert "chore: update nan resolution"

This reverts commit 786cdb858c9fc8a038a8f3e16068ee5b4a050137.

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-11-14 13:21:32 -08:00
Shelley Vohr
7981d955b8
fix: chrome.action API registration (#40500) 2023-11-13 08:27:18 +01:00
David Sanders
cf5f0419f1
chore: fix some typos (#40506) 2023-11-12 19:51:56 -08:00
Samuel Attard
d504d150ef
feat: add new fuse to treat file: identically to browsers (#40372) 2023-11-09 10:23:52 -08:00
Felix Rieseberg
b55d7f4a16
fix: Do not activate app when calling focus on inactive panel window (#40307)
* fix: Do not activate app when calling focus on inactive panel window

* Use activate

* Use "activate" for all windows
2023-11-06 13:38:12 -08:00
Shelley Vohr
7999ea39e2
feat: keyboard.lock() should use permissions helper (#40369)
feat: `keyboard.lock()` should use permissions helper
2023-11-06 11:54:31 -08:00
electron-roller[bot]
ee108903a0
chore: bump chromium to 121.0.6104.0 (main) (#40418)
* chore: bump chromium in DEPS to 121.0.6101.0

* chore: update patches

* Explictly use python3 to check patch diff

* chore: bump chromium in DEPS to 121.0.6102.0

* chore: update patches

* 4995136: [extensions] Enable Extension Mojo messaging

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

* Bind the components interfaces to a RenderFrame

https://chromium-review.googlesource.com/c/chromium/src/+/4985961
Also:
3986427: Create RendererHost mojom interface for Extensions | https://chromium-review.googlesource.com/c/chromium/src/+/3986427

* 4997024: Enum modernisation for resources_private.idl

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

* 4997025: Enum modernisation for scripting.idl

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

* chore: bump chromium in DEPS to 121.0.6103.0

* chore: update patches

* chore: bump chromium in DEPS to 121.0.6104.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2023-11-03 15:37:55 -04:00
Shelley Vohr
5b18d90597
fix: crash when unloading some WebViews (#40400) 2023-11-03 10:36:25 -04:00
electron-roller[bot]
5200abe744
chore: bump chromium to 121.0.6100.0 (main) (#40408)
* chore: bump chromium in DEPS to 121.0.6100.0

* chore: update patches

* 4970322: [X11] Move utils into x11::Connection

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-11-01 19:01:01 -04:00
electron-roller[bot]
bc1ba1fe9d
chore: bump chromium to 120.0.6099.0 (main) (#40316)
* chore: bump chromium in DEPS to 120.0.6086.0

* chore: update patches

* chore: rename FrameSubscriber::OnNewCropVersion()

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

just a simple renaming

* chore: rename ToJsTime() to .InMillisecondsFSinceUnixEpoch()

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

function renamed upstream

* chore: rename ToDoubleT() to .InSecondsFSinceUnixEpoch()

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

function renamed upstream

* chore: rename FromDoubleT() to .FromSecondsSinceUnixEpoch()

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

function renamed upstream

* chore: bump chromium in DEPS to 120.0.6088.2

* chore: update patches

* chore: regen filenames.libcxx.gni

* chore: migrate from (removed upstream) inputFormType to formControlType

* chore: bump chromium in DEPS to 120.0.6089.0

* chore: update allow_disabling_blink_scheduler_throttling_per_renderview.patch

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

manually sync to upstream changes + reduce diff size

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6090.0

* chore: update fix_disabling_background_throttling_in_compositor.patch

no manual changes; patch applied with fuzz 2 (4 lines)

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

* chore: update fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch

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

do not patch WebContentsImpl::SetWindowShowState() any longer because it has been removed

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6091.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6093.0

* chore: bump chromium in DEPS to 120.0.6095.0

* chore: bump chromium in DEPS to 120.0.6096.0

* chore: bump chromium in DEPS to 120.0.6097.0

* chore: update patches

* chore: update patch after rebase

* 4961495: [document pip] Focus the window when opened manually

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

* [Extensions UserScripts] Store extensions with user scripts in tracker

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

* chore: bump chromium in DEPS to 120.0.6099.0

* chore: update patches

* chore: update filenames.libcxx.gni

* chore: remove trailing space

---------

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: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-11-01 10:02:12 -04:00
Shelley Vohr
fcdd5cba71
fix: navigator.keyboard.lock() fullscreen exit handling (#40365)
fix: navigator.keyboard.lock() fullscreen exit handling
2023-10-31 11:59:39 -04:00
Milan Burda
4b1c31e4db
fix: implement missing applicationSupportsSecureRestorableState (#40296) 2023-10-31 10:22:58 -04:00
Shelley Vohr
652f995128
refactor: remove DevTools legacy UI patching (#40331) 2023-10-26 14:36:04 -04:00
Milan Burda
30fbcfca7b
chore: remove deprecated gpu-process-crashed event (#40255)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-26 14:05:40 -04:00
Shelley Vohr
3f92a98315
fix: prevent PopUpButtonHandler premature dealloc (#40308)
fix: prevent PopUpButtonHandler dealloc
2023-10-26 11:40:02 -04:00
electron-roller[bot]
be44a2c5b7
chore: bump chromium to 120.0.6078.0 (main) (#40114)
* chore: bump chromium in DEPS to 120.0.6049.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6050.0

* chore: update patches

* 4910494: Reland "[autopip] Show autopip UI for video pip"

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

* 4812338: Move partition_alloc into a "partition_alloc" dir.

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

* [Extensions Cleanup] Remove mojom ViewType::kExtensionDialog

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

* 4894923: Force enable raw_ptrs pointer arithmetic check.

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

* gin: Prevent wrappables from being constructed from author code.

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

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6052.0

* chore: bump chromium in DEPS to 120.0.6054.0

* chore: bump chromium in DEPS to 120.0.6056.0

* chore: fix patches

* 4918545: Reland "[autopip] Add permissions embargo"
https://chromium-review.googlesource.com/c/chromium/src/+/4918545

* 4881761: UI bindings for visual logging with structured metrics.

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

* chore: bump chromium in DEPS to 120.0.6058.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6060.0

* chore: bump chromium in DEPS to 120.0.6061.0

* chore: bump chromium in DEPS to 120.0.6062.0

* chore: gen libc++ filenames

* chore: update patches

* 4911894: Move //c/b/ui/views/eye_dropper to //components
https://chromium-review.googlesource.com/c/chromium/src/+/4911894

* chore: bump chromium in DEPS to 120.0.6064.0

* chore: bump chromium in DEPS to 120.0.6066.0

* chore: bump chromium in DEPS to 120.0.6068.0

* chore: bump chromium in DEPS to 120.0.6070.0

* chore: remove temp_prevent_unused_function_error.patch

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

* chore: add TransferDragSecurityInfo()

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

* mark TransferDragSecurityInfo() as NOTREACHED

A follow-up to previous commit. I think this is commit is correct (i.e.
that this function shouldn't get called) but am not positive, so I'm
including it in a standalone commit in case we need to revert.

* chore: update signature of OnPrivateNetworkAccessPermissionRequired()

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

Our impl is a no-op, so updating the signature is the only change.

* chore: rebuild patches

* chore: bump chromium in DEPS to 120.0.6072.0

* chore: update patches

* chore: sync ParseMatchPattern() param order with upstream change

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

* chore: update fix_crash_loading_non-standard_schemes_in_iframes.patch

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

* chore: rebuild patches

* chore: bump chromium in DEPS to 120.0.6073.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6074.0

* chore: update disable_color_correct_rendering.patch

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

no manual changes; patch applied with fuzz 1

* chore: update fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch

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

minor manual sync to upstream code shear

* chore: rebuild patches

* chore: update ClearHttpAuthCache arguments

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

adding ClearDataFilterPtr arg. Upstream added this arg, which is already
present in other NetworkContext methods. Our code uses `nullptr` there.

* chore: bump chromium in DEPS to 120.0.6076.0

* chore: update mas_disable_remote_accessibility.patch

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

minor manual sync to upstream code shear

* chore: update disable_color_correct_rendering.patch

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

minor manual sync to upstream code shear

* fix: move x11_util.h include to top of source file

This is a short-term fix to unblock the roll. I will follow up a better fix in a standalone PR.

* chore: rebuild patches

* chore: bump chromium in DEPS to 120.0.6077.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6078.0

* chore: update patches

* refactor: add BrowserProcessImpl::os_crypt_async()

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

This is one to keep an eye on. This commit copies the upstream impl,
which appears to be an interim step with more upstream code changes
still forthcoming.

Xref: https://bugs.chromium.org/p/chromium/issues/detail?id=1373092

* fixup! refactor: add BrowserProcessImpl::os_crypt_async()

chore: make 'gn check' happy

* chore: remove ensure_messageports_get_gced_when_not_referenced.patch

Xref: ensure_messageports_get_gced_when_not_referenced.patch

no longer needed because upstreamed

* chore: remove webrtc/pipewire_capturer_make_restore_tokens_re-usable_more_than_one_time.patch

Xref: https://webrtc-review.googlesource.com/c/src/+/322621

no longer needed because upstreamed

* chore: add //components/compose:buildflags dep

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

needed by browser/ui/browser_dialogs.h

* chore: update filenames.libcxx.gni

node ./script/gen-libc++-filenames.js

* test: fix UI.InspectorView -> UI.InspectorView.instance()

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2023-10-24 11:24:20 -04:00
Milan Burda
beb0cbc6d0
refactor: options parsing in WebContents.prototype.printToPDF() (#40257)
* refactor: options parsing in WebContents.prototype.printToPDF()

* tweak parsePageSize
2023-10-19 15:38:30 -04:00
Shelley Vohr
025af3500c
chore: Show FIDO devices in the chooser if allowed (#40216)
* chore: Show FIDO devices in the chooser if allowed

* chore: tweak HidChooserContext::IsFidoAllowedForOrigin

* chore: feedback from review

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-18 19:19:51 -04:00
Samuel Attard
fd2861117e
fix: correctly track receiver for methods called via ctx bridge (#39978)
* fix: correctly track receiver for methods called via ctx bridge

* spec: test for correct contextBridge passage

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2023-10-18 10:21:42 -04:00
Shelley Vohr
5b105f911f
chore: implement no-op chrome.action extension APIs (#40222)
chore: implement no-op chrome.action extension APIs
2023-10-18 10:19:31 -04:00
Shelley Vohr
666907d50d
fix: Windows Toast notification dismissal from Action Center (#40197)
* fix: Windows Toast notification dismissal from Action Center

* docs: note Toast behavior in  event

* chore: address feedback from review
2023-10-17 19:33:00 -04:00
Shelley Vohr
73a42d0b7b
refactor: partition HidDelegate observers by browser context (#40215) 2023-10-17 16:54:53 -04:00
Shelley Vohr
f7b1c75c72
feat: update app.{set|get}LoginItemSettings(settings) (#37244)
* feat: update app.{set|get}LoginItemSettings(settings)

* test: fixup and add tests

* docs: add type link

* chore: name -> serviceName
2023-10-16 12:25:11 -04:00
Shelley Vohr
f362e089b1
fix: incorrect wco bounds in macOS fullscreen (#40179) 2023-10-16 11:18:31 +02:00
Samuel Maddock
c9f6f15df6
refactor: use getter property for RFH (#40200) 2023-10-16 09:16:51 +09:00
Shelley Vohr
5c821d3379
fix: webContents.capturePage() for hidden windows on Windows/Linux (#39730) 2023-10-12 09:35:23 +02:00
Shelley Vohr
86df4db6f1
fix: crash when calling non-reentrant function in loadURL (#40143) 2023-10-10 12:46:04 +02:00
Milan Burda
563c370d51
refactor: use gin_helper::Dictionary::CreateEmpty() helper (#40140) 2023-10-10 12:45:44 +02:00
Tomasz
925e4f7d74
feat: Add 'mouse-enter' and 'mouse-leave' Tray events for Windows. (#40072) 2023-10-09 19:56:38 -04:00
Cheng Zhao
f5c177698e
fix: remove EarlyMallocZoneRegistration call (#40128) 2023-10-09 09:43:51 +09:00
Milan Burda
6a99c7b840
refactor: eliminate duplicate code (#40088) 2023-10-09 08:43:50 +09:00
Keeley Hammond
cff50ac65a
fix: fix vibrancy applying without transparency on MacOS (#40109) 2023-10-06 11:57:26 -07:00
Shelley Vohr
73553032ea
fix: toggling DevTools while minimized on Windows (#40091)
fix: toggling devtools while minimized on Windows
2023-10-05 20:26:31 -04:00
electron-roller[bot]
8f7a48879e
chore: bump chromium to 119.0.6045.0 (main) (#40076)
* chore: bump chromium in DEPS to 119.0.6045.0

* chore: update patches

* 4864948: Remove legacy-legacy

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4864948

* 4907760: Remove ui/base/glib/glib_signal.h

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-05 19:59:39 -04:00
Milan Burda
83a928f6e3
fix: crashed events deprecation (#40090) 2023-10-05 19:57:14 -04:00
Shelley Vohr
3392d9a2e7
fix: all children showing when showing child window (#40062) 2023-10-05 09:19:57 -04:00
Shelley Vohr
b0590b6ee8
fix: failing build with enable_electron_extensions=false (#40032)
* fix: ENABLE_EXTENSIONS -> ENABLE_ELECTRON_EXTENSIONS

* fix: extension guard fixes

* chore: fix linker errors
2023-10-04 10:40:01 +02:00
Shelley Vohr
713d8c4167
feat: add tabbingIdentifier property to BrowserWindow (#39980)
feat: add tabbingIdentifier property to BrowserWindow
2023-10-03 12:27:40 -07:00
Milan Burda
04b2ba84cd
refactor: replace remaining NULL with nullptr (#40053)
refactor: use nullptr everywhere
2023-10-03 12:26:35 -07:00
electron-roller[bot]
9d0e6d09f0
chore: bump chromium to 119.0.6043.0 (main) (#40045)
* chore: bump chromium in DEPS to 119.0.6036.0

* chore: bump chromium in DEPS to 119.0.6037.0

* chore: bump chromium in DEPS to 119.0.6039.0

* chore: bump chromium in DEPS to 119.0.6041.0

* chore: update chromium patches

* 4765230: Move //content/browser/renderer_host/event_with_latency_info.h to //content/common/input | https://chromium-review.googlesource.com/c/chromium/src/+/4765230

* 4890325: ScopedRunLoopTimeout: add custom timeout callback handler for testing | https://chromium-review.googlesource.com/c/chromium/src/+/4890325

* chore: update all patches

* chore: bump chromium in DEPS to 119.0.6043.0

* 4898682: [api] Add Error.cause to V8 API

https://chromium-review.googlesource.com/c/v8/v8/+/4898682

* 4837192: Plumb origin through for drags.

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

* Prevent content analysis on web pages that don't accept drag and drop.

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

* Make getting displayed notifications work with notification attribution.

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

* 4898682: [api] Add Error.cause to V8 API

https://chromium-review.googlesource.com/c/v8/v8/+/4898682

* lib,test: do not hardcode Buffer.kMaxLength

https://github.com/nodejs/node/pull/49876

* chore: remove Goma warning from mksnapshot_args

* 4776412: Remove Windows-specific wstring variants of StringPrintf() etc.

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

* [dPWA] Prevent WebAppInstallInfo from being included on Android

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-02 18:01:07 -04:00
Milan Burda
d301616f60
chore: remove deprecated app.runningUnderRosettaTranslation() (#39956) 2023-10-02 10:55:32 +02:00
Shelley Vohr
5643e86956
chore: update extensions url handling to match upstream (#40038)
- https://chromium-review.googlesource.com/c/chromium/src/+/4772028
- https://chromium-review.googlesource.com/c/chromium/src/+/4264656
- https://chromium-review.googlesource.com/c/chromium/src/+/4712150
2023-10-02 10:35:00 +02:00
electron-roller[bot]
d6c8ff2e70
chore: bump chromium to 119.0.6029.0 (main) (#39944)
* chore: bump chromium in DEPS to 119.0.6021.0

* 4727729: Initial ScreenCaptureKit AudioInputStream implementation

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

* chore: fixup patch indices

* chore: bump chromium in DEPS to 119.0.6023.0

* 4875713: mac: Switch to Xcode 15.0 15A240d with macOS SDK 14.0 23A334

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

* 4831380: [task-attribution] Reland: Move to an implicit GCed task container model

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

* 4877868: Remove all gitignore entries for submodules

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

* 4824705: Set origin to commit for data: URLs

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

* chore: fixup patch indices

* 4881382: Expose selection in WebFormControlElement as unsigned

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

* 4874216: Portals: Cancel drag-drop in predecessor before activation

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

* chore: bump chromium in DEPS to 119.0.6025.0

* chore: bump chromium in DEPS to 119.0.6027.0

* 4884489: Update gitignore to be explicit about directories

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

* 4881091: Add debug info about owner document's origin when inheriting

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

* chore: fixup patch indices

* chore: bump chromium in DEPS to 119.0.6029.0

* chore: update patches

* 4881091: Add debug info about owner document's origin when inheriting

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

* 4831380: [task-attribution] Reland: Move to an implicit GCed task container model

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

* 4866732: Extract document.title for installable checks

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

* chore: link to crbug in message port test

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2023-09-28 22:26:41 -07:00
ILikeTeaALot
d002f16157
feat: systemPreferences.getColor should return RGBA instead of RGB (#38960)
* fix: return RGBA hex value from `SystemPreferences.getColor`

* docs: update docs to match changes of last commit

* fix: GetColor on windows now returns RGBA too

* fix: update tests for getColor RGBA on Windows

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-28 18:56:16 -04:00
Bruno Pitrus
dd7395ebed
chore: add missing include for std::variant (#40007) 2023-09-28 12:50:58 -04:00
Bruno Pitrus
e3e793d25b
chore: remove invalid constexpr qualification (#40006)
GetPathConstant calls base::internal::flat_tree<Key, GetKeyFromValue, KeyCompare, Container>::find(Key const&) const which is not constexpr.
GCC 12 and earlier raise a compile error on this.
2023-09-28 12:49:09 -04:00
Cheng Zhao
4cf6884dd4
fix: detect screen readers by testing their existences (#39988) 2023-09-28 11:17:42 -04:00
marekharanczyk
94585f5889
fix: propagate layout call to all children of InspectableWebContentsViewViews (#39994)
Propagate layout call to all children of InspectableWebContentsViewViews.

When BrowserView bounds are set from js, those might not trigger layout
immediately, sometimes propagating InvalidateLayout call to parent.
View is marked as needing layout, expecting to receive it from parent on
next layout call. The problem is that BrowserView's view is added as child
of InspectableWebContentsViews which does not call setBounds (which
would trigger layout) on all of it's children when doing it's layout,
so it skips propagating Layout call to its children BrowserViews views,
even though those were marked as needing layout.
Call base class View::Layout which will iterate over views' children
and call Layout on those that were marked as needing them.

Fixes #39993.
2023-09-28 11:17:21 -04:00
Tomasz
689d1b76de
feat: add middle click event to tray (#39926)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-27 14:21:15 -04:00
Robert Günzler
480f48b2fc
feat: enable dark mode on GTK UIs (#38977)
feat: port DarkModeManagerLinux

This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903
and replaces the previous workaround to detect dark mode on GTK.
Detect system dark theme preference via xdg settings portal:
https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings

Closes: https://github.com/electron/electron/issues/38961
Closes: https://github.com/electron/electron/issues/28838

Signed-off-by: Robert Günzler <r@gnzler.io>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-27 14:17:40 -04:00
Bruno Henrique da Silva
f943b8c940
fix: set window contents as opaque to decrease DWM GPU usage (#39895)
* set window contents as opaque to decrease DWM GPU usage

* chore: add more context to ShouldWindowContentsBeTransparent
2023-09-27 10:42:46 -04:00
Shelley Vohr
b7c9c895b5
build: fix with enable_pdf_viewer = false (#39990)
build: fix with enable_pdf_viewer = false
2023-09-27 10:09:53 -04:00
Shelley Vohr
1ba321b733
fix: rounded corners on vibrant macOS modals (#39979)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-27 15:12:37 +02:00
Cheng Zhao
ad57867594
fix: apply size constraints to NSWindow (#39975) 2023-09-27 11:11:24 +02:00
michal-pichlinski-openfin
2190793fe6
fix: disable background throttling also in the viz::DisplayScheduler (#38924)
* 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>
2023-09-26 16:00:46 -04:00
Milan Burda
d75a852743
refactor: use type enum in file stats for asar archive (#39889) 2023-09-25 13:17:24 +02:00
Valentin Hăloiu
58fd8825d2
fix: add support for ELECTRON_OZONE_PLATFORM_HINT env var (#39792)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-20 16:21:23 -04:00
Milan Burda
6a8b70639b
fix: app.runningUnderARM64Translation() always returning true on Windows ARM64 (#39920)
fix: app.runningUnderARM64Translation() always returning true on ARM64
2023-09-20 16:15:19 -04:00
electron-roller[bot]
28eda03aba
chore: bump chromium to 119.0.6019.2 (main) (#39925)
* chore: bump chromium in DEPS to 119.0.6018.4

* chore: update patches

* chore: bump chromium in DEPS to 119.0.6019.2

* chore: update patches

* 4876292: Roll libc++ from 7cee6b00d34a to 3e8a3b3c5d49 (6 revisions)

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

* 4851616: [Extensions] Enable matchOriginAsFallback for dynamic content scripts

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

* 4869393: [Extensions UserScripts] Add error messages for script matching errors

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

---------

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: Shelley Vohr <shelley.vohr@gmail.com>
2023-09-20 16:08:26 -04:00
George Xu
7685f27b31
feat: expose app accessibility transparency settings api (#39631)
* feat: expose app accessibility transparency settings api

* docs: fix typo

* chore: add doc

* change to property

* add as property instead of method

* chore: fix lint

* rename function name in header

---------

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2023-09-20 12:48:02 -07:00
electron-roller[bot]
73e33bc876
chore: bump chromium to 119.0.6006.0 (main) (#39774)
* chore: bump chromium in DEPS to 119.0.5994.0

* chore: update patches

* Add some more debugging for navigation origin & process lock mismatch

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

* chore: bump chromium in DEPS to 119.0.5996.2

* chore: bump chromium in DEPS to 119.0.5997.0

* chore: bump chromium in DEPS to 119.0.6000.0

* chore: bump chromium in DEPS to 119.0.6002.0

* 4781766: Port remaining control color ids to the color pipeline

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

* 4846057: Preloading: Move prefetch_prefs to chrome/browser/preloading/

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

* chore: fixup patch indices

* 4848108: Pass v8::Isolate into FromV8Value calls on blink API

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

* 4834471: Reland "[api] allow v8::Data as internal field"

https://chromium-review.googlesource.com/c/v8/v8/+/4834471

* 4808884: Major overhaul of ExceptionState in the v8 bindings

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

* 4791643: [sandbox] Add a TRUSTED_SPACE and TRUSTED_LO_SPACE to the V8 heap

https://chromium-review.googlesource.com/c/v8/v8/+/4791643

* chore: bump chromium in DEPS to 119.0.6005.0

* 4776268: [v8][etw] Enables filtering of ETW tracing by URL

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

* chore: fixup patch indices

* 4673258: WebSQL: Disable WebSQL by default

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

* chore: bump chromium in DEPS to 119.0.6006.0

* chore: update patches

* 4854732: Reland^2 "[iterator-helpers] Unship due to incompat"

https://chromium-review.googlesource.com/c/v8/v8/+/4854732

* 4794133: [AWC] Add `display-state` CSS @media feature

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

* fixup! Add some more debugging for navigation origin & process lock mismatch

* Revert "fixup! Add some more debugging for navigation origin & process lock mismatch"

This reverts commit 38fef075fc5690f7db6d4bbcabbe877a1618a964.

* 4858437: Revert "[iOS] Delete GN flags for mach absolute time ticks"

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

* refactor: fix_crash_loading_non-standard_schemes_in_iframes.patch (#39879)

* chore: 4869108: handle absolute and relative gn imports in autoninja

https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4869108

* chore: set GOMA_DIR for autoninja

* Revert "chore: 4869108: handle absolute and relative gn imports in autoninja"

This reverts commit d94c7720bab96d1de25499383948da2cb8862d90.

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
2023-09-18 16:44:09 -04:00
Milan Burda
d7e4bb6608
chore: remove no-op fullscreenWindowTitle option (#39815) 2023-09-19 01:55:47 +09:00
Milan Burda
fb6b92076e
fix: prevent gin_helper::Locker heap allocation (#39847)
fix: prevent gin_helper::Locker heap allocation
2023-09-14 15:48:43 -04:00
Charles Kerr
f6e8a42c48
refactor: remove unused fields, methods in gin_helper::Locker (#39803)
* refactor: remove unused field gin_helper::Locker::g_is_browser_process

refactor: remove unused field gin_helper::Locker::g_is_renderer_process

refactor: make field const gin_helper::Locker::locker_

* refactor: remove unused declaration gin_helper::Locker::new()

refactor: remove unused declaration gin_helper::Locker::delete()

* refactor: make field const electron::JavascriptEnvironment::locker_

* refactor: remove unused #include gin_helper/locker.h
2023-09-12 16:53:20 -07:00
Charles Kerr
a1c44a18e2
fix: NodeService order-of-destruction issue (#39783)
* refactor: make ElectronRendererClient::node_bindings_ a const ptr

refactor: make ElectronRendererClient::electron_bindings_ a const ptr

* fix: order-of-destruction bug in NodeService

js_env_ depends on the uv_loop from node_bindings_, but is destroyed after node_bindings_

* chore: revert unintentional commit
2023-09-12 12:27:14 +02:00
Shelley Vohr
ec9c8476fe
fix: keyCodes being incorrectly converted in webContents.sendInputEvent() (#39776)
fix: sendInputEvent keyCodes being incorrectly converted
2023-09-12 11:28:45 +02:00
Samuel Attard
5bff0fe342
feat: add new ElectronSquirrelPreventDowngrades flag (#38625)
* sketch

* feat: add new ElectronSquirrelPreventDowngrades flag

* test: remove only

* chore: fix lint
2023-09-11 11:54:51 -07:00
Samuel Attard
16aec702b4
fix: ensure app load is limited to real asar files when appropriate (#39788) 2023-09-11 11:51:14 -07:00
David Sanders
aceb432f45
chore: remove deprecated systemPreferences APIs (#39696) 2023-09-11 11:34:13 -04:00
Calvin
d182794179
fix: frameless mica/acrylic windows (#39708)
* fix: backgroundMaterial works with frameless

* TODO: fix frameless mica/acrylic windows

* update caption color appropriately

* set background color properly

* refactor translucency method

* actualization
2023-09-11 14:51:54 +02:00
Shelley Vohr
ab185c058f
fix: fullscreen crashing with no roundedCorners and no frame (#39747) 2023-09-11 09:38:10 +02:00
Charles Kerr
792037b338
fix: raw_ptr destruction order in NodeBindings (#39762) 2023-09-07 18:25:17 -05:00
Samuel Attard
0b44f433c8
fix: make titlebar opaque while fullscreen (#39759) 2023-09-07 15:55:17 -07:00
Shelley Vohr
75bad34131
fix: prevent errors when extensions listen for chrome.tabs events (#39729)
* fix: prevent errors when extensions listen for chrome.tabs events

* chore: mark events unsupported in Electron
2023-09-07 12:41:24 +02:00
Robo
0a064cece9
fix: devtools allow restoring saved dock state on Windows (#39734)
* fix: devtools allow restoring saved dock state on Windows

* chore: address feedback
2023-09-07 17:14:01 +09:00
electron-roller[bot]
d9ba26273a
chore: bump chromium to 118.0.5991.0 (main) (#39714)
* chore: bump chromium in DEPS to 118.0.5982.0

* chore: bump chromium in DEPS to 118.0.5983.0

* chore: bump chromium in DEPS to 118.0.5985.0

* chore: bump chromium in DEPS to 118.0.5987.0

* chore: update v8 patches

* chore: update chromium patches

* chore: update patches

* [PEPC] Add new structs to contain permission request data

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

* Add ThumbnailCapturer interface

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

* Reland "[ChromeRefresh2023] Update document pip windows for Chrome Refresh"

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

* chore: bump chromium in DEPS to 118.0.5989.0

* chore: bump chromium in DEPS to 118.0.5991.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2023-09-05 21:17:56 -04:00
David Sanders
c96bb9958f
chore: remove deprecated webContents.getPrinters() (#39663) 2023-09-05 10:16:41 +02:00
Shelley Vohr
54d8402a6c
fix: broken chrome.scripting compilation (#39725)
fix: broken chrome.scripting impl after roll
2023-09-04 16:03:10 +09:00
electron-roller[bot]
89117fdd99
chore: bump chromium to 118.0.5975.0 (main) (#39531)
* chore: bump chromium in DEPS to 118.0.5951.0

* chore: update printing.patch

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

No logic changes, but patch needed to be manually re-applied due to upstream code shear

* chore: update port_autofill_colors_to_the_color_pipeline.patch

No manual changes; patch applied with fuzz

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5953.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5955.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5957.0

* chore: update patches

* chore: include path of native_web_keyboard_event.h

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

* chore: remove reference to eextensions/browser/notification-types.h

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

* chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser

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

Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code?

* chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change

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

* chore: add auto_pip_setting_helper.[cc,h] to chromium_src build

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

Exiting upstream code used by chromium_src now depends on this new upstream class

* chore: bump chromium in DEPS to 118.0.5959.0

* chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch

Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch

manually adjust patch to minor upstream chagnes

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5961.0

* chore: bump chromium in DEPS to 118.0.5963.0

* chore: update patches

* 4780994: Rename various base files to "apple" since iOS uses them too
https://chromium-review.googlesource.com/c/chromium/src/+/4780994

* Many files moved from `mac` -> `apple`

This commit follows a handful of CLs that simply rename files/symbols to change `mac`
to `apple`
to signify their use across both macOS and iOS:
- 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
- 4790744: Move foundation_util to base/apple, leave a forwarding header
- 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header
- 4787627: Move and rename macOS+iOS base/ files in PA to "apple"
- 4780399: Move OSStatus logging to base/apple
- 4787387: Remove forwarding headers
- 4781113: Rename message_pump_mac to "apple" because iOS uses it too

* fixup minor patch update error

A function param got dropped from this patch somewhere earlier

* chore: bump chromium in DEPS to 118.0.5965.2

* chore: update patches

* 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base:🍎:
https://chromium-review.googlesource.com/c/chromium/src/+/4799213

* Fix removed include to BrowserContext

In crrev.com/c/4767962 an include to BrowserContext was removed,
which was necessary for compilation. This broke only for us because
"chrome/browser/profiles/profile.h" includes that class, but we remove
all references to profiles.

* chore: bump chromium in DEPS to 118.0.5967.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5969.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5971.0

* chore: bump chromium in DEPS to 118.0.5973.0

* chore: update patches

* 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper
https://chromium-review.googlesource.com/c/chromium/src/+/4772121

* 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate.
https://chromium-review.googlesource.com/c/chromium/src/+/4811164

* 4809488: Remove duplicate dnd functionality between Web and Renderer prefs
https://chromium-review.googlesource.com/c/chromium/src/+/4809488

Given that this is no longer an option of web preferences, we should
consider deprecating this option and then removing it.

* chore: bump chromium in DEPS to 118.0.5975.0

* chore: update patches

* fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build

* Reland "[windows] Remove RegKey::DeleteEmptyKey"

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

* Ensure StrCat means StrCat

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

* fixup! Remove RegKey::DeleteEmptyKey

* Consistently reject large p and large q in DH

Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226

---------

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: clavin <clavin@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-09-01 15:54:59 +09:00
Samuel Attard
ac031bf8de
feat: I guess it's esm (#37535)
* fix: allow ESM loads from within ASAR files

* fix: ensure that ESM entry points finish loading before app ready

* fix: allow loading ESM entrypoints via default_app

* fix: allow ESM loading for renderer preloads

* docs: document current known limitations of esm

* chore: add patches to support blending esm handlers

* refactor: use SetDefersLoading instead of JoinAppCode in renderers

Blink has it's own event loop so pumping the uv loop in the renderer is not enough, luckily in blink we can suspend the loading of the frame while we do additional work.

* chore: add patch to expose SetDefersLoading

* fix: use fileURLToPath instead of pathname

* chore: update per PR feedback

* fix: fs.exists/existsSync should never throw

* fix: convert path to file url before importing

* fix: oops

* fix: oops

* Update docs/tutorial/esm-limitations.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* windows...

* windows...

* chore: update patches

* spec: fix tests and document empty body edge case

* Apply suggestions from code review

Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* spec: add tests for esm

* spec: windows

* chore: update per PR feedback

* chore: update patches

* Update shell/common/node_bindings.h

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* chore: update patches

* rebase

* use cjs loader by default for preload scripts

* chore: fix lint

* chore: update patches

* chore: update patches

* chore: fix patches

* build: debug depshash

* ?

* Revert "build: debug depshash"

This reverts commit 0de82523fb93f475226356b37418ce4b69acdcdf.

* chore: allow electron as builtin protocol in esm loader

* Revert "Revert "build: debug depshash""

This reverts commit ff86b1243ca6d05c9b3b38e0a6d717fb380343a4.

* chore: fix esm doc

* chore: update node patches

---------

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
2023-08-30 17:38:07 -07:00
Shelley Vohr
f0ad357af2
feat: support chrome.scripting extension APIs (#39395)
feat: support chrome.scripting extension  APIs
2023-08-28 10:39:28 -04:00
Milan Burda
5078cae861
chore: remove deprecated ipcRenderer.sendTo() (#39087)
chore: remove deprecated ipcRenderer.sendTo()
2023-08-28 10:29:27 -04:00
Shelley Vohr
f369b144d6
feat: add more extensions manifest key options (#39599)
feat: add more manifest key options
2023-08-28 10:02:22 -04:00
wanted002
e14964ccd0
feat: add setter and getter apis to specify udp port range for webrtc (#39046)
* feat:Add setter and getter apis to specify udp port range for webrtc (issue#9042)

* lint error fix for PR#39046

* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for codereview

* fix lint error

* fix lint errors in file api-web-contents-spec.ts

* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from itsananderson

* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from jkleinsc

* fix lint error

* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from codebyter
2023-08-24 17:21:22 -04:00