Commit graph

633 commits

Author SHA1 Message Date
Milan Burda
ef6569b7d3
chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
Milan Burda
d78f37ec8f
refactor: use node scheme imports in spec (#38487)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-15 10:42:27 -04:00
Milan Burda
5d123765d9
feat: support node: prefixed requires in sandboxed renderer preloads (#38567)
feat: support node: prefixed requires in sandboxed renderer preloads
2023-06-10 14:36:16 -04:00
Milan Burda
82af000a37
chore: cleanup eslint suppressions (#38417)
* chore: cleanup eslint suppressions

* address feedback

* revert script/lib/azput.js

* revert spec/fixtures/apps/remote-control/main.js

* address feedback

* revert typings/internal-ambient.d.ts
2023-05-25 10:09:17 +09:00
Shelley Vohr
0212c264ca
build: fix CRLF endings in messages.json (#38212) 2023-05-08 14:51:24 -04:00
Robo
0240f6664e
fix: crash in utilityProcess when generating code from strings (#38014) 2023-04-20 09:27:02 +09:00
Shelley Vohr
251e567eff
fix: don't emit did-fail-load for MediaDocuments (#37824)
* fix: don't emit did-fail-load for MediaDocuments

* spec: add test
2023-04-06 10:23:34 +02:00
John Kleinschmidt
8f3ef39f1e
chore: update line endings on HTML files (#37755) 2023-03-29 15:02:13 -04:00
Will Anderson
2b9dae4b06
feat: add will-frame-navigate event (#34418)
* feat: add will-navigate-in-frame event to webContents

* docs: add documentation for webview will-frame-navigate event

* feat: Eliminate isInPlace argument from will-frame-navigate event

* fix: Fire will-frame-navigate before will-navigate

* feat: send will-frame-navigate with a WebFrameMain in the event details

* docs: Update WebContents docs for new API signature

* feat: Add custom event forwarding for <webview> will-frame-navigate

* fix: wrap WebFrameMain so it can be sent as an event

* test: update webContents and <webview> tests to match new signatures

* chore: undo unnecessary change

* fix: don't switch will-navigate to use EmitNavigationEventDetails

* test: clean up will-navigate and will-frame-navigate tests for <webview>

* chore: apply lint fixes

* chore: move GetRenderFrameHost helper into anonymous namespace

* docs: auto-generate WillFrameNavigateDetails rather than defining it manually

* test: Update <webview> tests to actually pass under new spec runner

* docs: Add section explaining relationship between various nav events

* test: Add some tests to ensure navigation event order doesn't silently change

* test: Always monitor all nav events to ensure unexpected ones don't fire

* test: Add test to verify in-page navigation event order

* feat: Change to new style where extra params are exposed as event props

* fix: Remove unused EmitNavigationEventDetails

* fix: Update tests to use new async helpers

* docs: Rename and reorder sections documenting navigation events

---------

Co-authored-by: Milan Burda <milan.burda@gmail.com>
2023-03-28 10:55:41 -04:00
Shelley Vohr
8ee58e18fd
refactor: createThumbnailFromPath takes size not maxSize (#37362)
refactor: createThumbnailFromPath takes size not maxSize
2023-03-08 21:48:29 -05:00
Shelley Vohr
829fb4f586
fix: don't double-log unhandled rejections (#37464) 2023-03-06 11:04:43 +01:00
Jeremy Rose
6bd9ee6988
feat: net.fetch() supports custom protocols (#36606) 2023-03-02 15:47:45 -08:00
Jeremy Rose
a3e3efe4c4
test: use node helpers for events.once and setTimeout promise (#37374) 2023-02-23 15:53:53 -08:00
Milan Burda
ea848bc1c5
test: use webContents.create() in type-safe way (#37281)
test: use (webContents as typeof ElectronInternal.WebContents).create()

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-16 15:41:41 +01:00
Milan Burda
beed240454
test: use render-process-gone event in tests (#37280)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-02-16 01:25:41 -08:00
Milan Burda
fd761ec8f7
chore: strip trailing whitespace (#35969) 2023-02-01 12:59:16 +01:00
Shelley Vohr
23739c644b
fix: crash on WebWorkerObserver script execution (#37050)
fix: crash on WebWorkerObserver script execution
2023-01-31 12:29:29 +01:00
Milan Burda
355f322dbd
chore: remove unused fixture_support.md (#37011)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-01-25 13:00:51 -08:00
Milan Burda
a9b6041d38
chore: remove unused files in spec/fixtures (#37012)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-01-25 16:02:44 +01:00
Shelley Vohr
37f5881882
test: add a <datalist> spec for time type (#36953)
spec: add a datalist spec for time type
2023-01-23 11:21:28 -05:00
Milan Burda
eb291485bb
chore: drop support for Windows 7 / 8 / 8.1 (#36427)
* chore: drop support for Windows 7 & 8

* chore: remove disable-redraw-lock.patch

* chore: update patches

* Update docs/breaking-changes.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update docs/breaking-changes.md

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

* fix breaking-changes.md

* chore: note last supported version

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

* chore: add link to deprecation policy

* Update docs/breaking-changes.md

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

* update README.md

Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2022-11-30 17:13:29 -08:00
Robo
2c723d7e84
fix: enable crashpad for ELECTRON_RUN_AS_NODE processes (#36460)
* wip: enable crashpad for node processes

fix: add PID testing method

wip: plumb fd into child_process in node

* node::ProcessInitializationFlags::kNoDefaultSignalHandling

* chore: clean up debug logging

* chore: gate platform includes

* test: clean up node process test

* fix: pass pid in node_main

* chore: cleanup impl

* chore: fixup patch method definition

* fix: expose bound methods to node_main

* fix: remove bound methods

* fix: crashpad connection for all ELECTRON_RUN_AS_NODE processes

* chore: fix typo

* chore: address review feedback

* chore: delay crashpad initialization

* chore: ensure options.env, code hygiene

* chore: add argv test, check for process.env over {}

* fix: fix test, return options.env immutability

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
2022-11-29 10:33:54 -05:00
Samuel Attard
d8bb172318
fix: abort ShipIt installation attempt at the final mile if the app is running (#36130)
* fix: abort ShipIt installation attempt at the final mile if the app is running

* chore: remove only

* Update patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch

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

* chore: update patches

* spec: make the ShipIt process lister helper more resilient

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-11-14 10:12:16 -08:00
Raymond Zhao
5fc3ed936e
feat: add app.getPreferredSystemLanguages() API (#36035)
* feat: add app.getSystemLanguage() API

* Change the API to getPreferredSystemLanguages

* Fix test

* Clarify docs and add Linux impl

* Remove USE_GLIB

* Don't add C to list

* Remove examples since there's a lot of edge cases

* Fix lint

* Add examples

* Fix compile error

* Apply PR feedback

* Update the example
2022-11-09 10:50:43 -05:00
Robo
da0fd286b4
feat: UtilityProcess API (#34980)
* chore: initial scaffolding

* chore: implement interface and docs

* chore: address code style review

* fix: cleanup of utility process on shutdown

* chore: simplify NodeBindings::CreateEnvironment

* chore: rename disableLibraryValidation => allowLoadingUnsignedLibraries

* chore: implement process.parentPort

* chore(posix): implement stdio pipe interface

* chore(win): implement stdio interface

* chore: reenable SetNodeOptions for utility process

* chore: add specs

* chore: fix lint

* fix: update kill API

* fix: update process.parentPort API

* fix: exit event

* docs: update exit event

* fix: tests on linux

* chore: expand on some comments

* fix: shutdown of pipe reader

Avoid logging since it is always the case that reader end of
pipe will terminate after the child process.

* fix: remove exit code check for crash spec

* fix: rm PR_SET_NO_NEW_PRIVS for unsandbox utility process

* chore: fix incorrect rebase

* fix: address review feedback

* chore: rename utility_process -> utility

* chore: update docs

* chore: cleanup c++ implemantation

* fix: leak in NodeServiceHost impl

* chore: minor cleanup

* chore: cleanup JS implementation

* chore: flip default stdio to inherit

* fix: some api improvements

* Support cwd option
* Remove path restriction for modulePath
* Rewire impl for env support

* fix: add tests for cwd and env option

* chore: alt impl for reading stdio handles

* chore: support message queuing

* chore: fix lint

* chore: new UtilityProcess => utilityProcess.fork

* fix: support for uncaught exception exits

* chore: remove process.execArgv as default

* fix: windows build

* fix: style changes

* fix: docs and style changes

* chore: update patches

* spec: disable flaky test on win32 arm CI

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-10-19 22:49:49 -07:00
Samuel Attard
44c40efecf
refactor: migrate from asar to @electron/asar (#36070)
* refactor: migrate from asar to @electron/asar

* fix: update asar require calls
2022-10-19 13:39:31 -07:00
electron-roller[bot]
f2c341b655
chore: bump chromium to 108.0.5355.0 (main) (#35900)
* chore: bump chromium in DEPS to 108.0.5339.0

* chore: bump chromium in DEPS to 108.0.5341.0

* chore: sync patch to unrelated upstream code shear

patches/chromium/network_service_allow_remote_certificate_verification_logic.patch

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

* chore: sync patch to unrelated upstream code shear

patches/chromium/printing.patch

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

* chore: sync patch to unrelated upstream code shear

patches/chromium/chore_add_electron_deps_to_gitignores.patch

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

* chore: refresh patches - `e patches all`

* chore: remove unused parameter from WillCreateURLLoaderRequestInterceptors

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

* perf: avoid unique pointer round trip

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

* refactor: Simplify entropy provider management.

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

* fixup! perf: avoid unique pointer round trip

* fixup! perf: avoid unique pointer round trip

* refactor: update typeof FileSelectHelper::select_file_dialog_

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

* fixup! fixup! perf: avoid unique pointer round trip

* chore: bump chromium in DEPS to 108.0.5343.0

* chore: update patches

* chore: bump chromium in DEPS to 108.0.5345.0

* chore: bump chromium in DEPS to 108.0.5347.0

* chore: bump chromium in DEPS to 108.0.5349.0

* chore: bump chromium in DEPS to 108.0.5351.0

* chore: bump chromium in DEPS to 108.0.5353.0

* chore: bump chromium in DEPS to 108.0.5355.0

* chore: update patches

* Refactor display::win::DisplayInfo to display::win::internal::DisplayInfo

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

* Update proxy resolution to use NAK - Part 2

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

* Disable PreconnectManager when the user disabled preloading.

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

* chore: update patches

* chore: update sysroot

* linux: Remove breakpad integration

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

* chore: update comments

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: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
2022-10-17 10:22:24 -04:00
Shelley Vohr
7ce94eb0b4
fix: disable nodeIntegrationInWorker for certain Worker types (#35919)
fix: disable nodeIntegrationInWorker for certain Worker types
2022-10-12 10:36:24 -04:00
Shelley Vohr
76afd8c028
test: more robust PDF specs (#35979) 2022-10-12 10:15:49 -04:00
Shelley Vohr
e8ae0571b8
test: remove redundant color diffing dependency (#33215) 2022-10-11 13:11:58 -04:00
Raymond Zhao
8a0b4fa338
feat: add app.getSystemLocale() method (#35697)
* feat: add app.getSystemLocale() method

* Update shell/browser/electron_browser_main_parts.cc

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

* Change methods to be const

* Apply PR feedback

* Fix mac compile

* Add missing scope

* Apply style changes

* Change note

* Add braces to get the comment indentation right

* Change to static

* Apply PR feedback

* Fix the documentation

* Remove extraneous file

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-09-23 11:50:46 -07:00
marekharanczyk
532162d2b5
fix: EventEmitter is missing properties in sandbox preload script. (#35522) 2022-09-15 09:33:08 -07:00
Shelley Vohr
e0fb5cbe1f
fix: crash loading non-standard schemes in iframes (#35485) 2022-08-31 10:08:11 +02:00
Jeremy Rose
db7c92fd57
test: drop now-empty remote runner (#35343)
* test: drop the now-empty remote runner from CI

* move fixtures to spec-main

* remove remote runner

* fix stuff

* remove global-paths hack

* move ts-smoke to spec/

* fix test after merge

* rename spec-main to spec

* no need to ignore spec/node_modules twice

* simplify spec-runner a little

* no need to hash pj/yl twice

* undo lint change to verify-mksnapshot.py

* excessive ..

* update electron_woa_testing.yml

* don't search for test-results-remote.xml

it is never produced now
2022-08-16 15:23:13 -04:00
Aaron Meriwether
91f9436ad8
fix: app.relaunch loses args when execPath specified (#35108) 2022-08-08 10:12:06 +02:00
Jeremy Rose
7c2ed98214
test: migrate more chromium specs to main (#35081) 2022-07-27 11:10:04 +02:00
Keeley Hammond
e83c3ec744
test: add first-party-set chromium tests (#34827)
test: add first-part-set chromium feature tests
2022-07-07 15:14:53 -04:00
Shelley Vohr
16db5a112e
fix: html fullscreen transitions stacking (#32905)
* fix: html fullscreen transitions stacking

* spec: move webview test to spec-main
2022-06-07 12:59:50 -04:00
electron-roller[bot]
470396d6ac
chore: bump chromium to 104.0.5073.0 (main) (#34272) 2022-06-01 08:12:47 +02:00
Keeley Hammond
38c21b7aca
revert: add first-instance-ack event to the app.requestSingleInstanceLock() flow (#34297)
fix: revert "feat: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow"
2022-05-22 22:20:54 -07:00
Milan Burda
658407df7a
test: fix require('echo') -> require('@electron-ci/echo') (#34026) 2022-05-03 11:49:01 -04:00
Micha Hanselmann
78a3752ade
fix: create userData on requestSingleInstanceLock() if needed (#33559)
* test: use custom userData folder for requestSingleInstanceLock()

* update test

* prefix test folder path

* fix: create userDataDir on requestSingleInstanceLock() if needed

* Trigger Build
2022-04-04 10:39:55 +09:00
Cheng Zhao
929fc8bea5
test: make test apps' name prefixed with electron-test- (#33511) 2022-03-30 13:17:34 -04:00
Fedor Indutny
06a00b74e8
fix: initialize asar support in worker threads (#33216)
* fix: initialize asar support in worker threads

Use `ObjectWrap` instead of gin's Wrap in `electron_api_asar.cc` because
gin isn't fully initialized (and apparently not possible to initialize
without ruining the isolate configuration and array buffer allocator) in
worker threads. In the worker thread call `setupAsarSupport` just as we
do for the main process.

* Update lib/asar/fs-wrapper.ts

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Update patches/node/worker_thread_add_asar_support.patch

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Add a test

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-03-22 20:37:55 -04:00
Milan Burda
9d054755d6
refactor: implement ajax() in tests using native fetch instead of jQuery (#32579) 2022-01-24 10:34:23 +01:00
Raymond Zhao
746927c972
feat: Add first-instance-ack event to the app.requestSingleInstanceLock() flow (#31460)
* feat: Add onFirstInstanceAck event for requestSingleInstanceLock

* Add tests

* Apply patch fix

* Add back missing docs

* Rebase

* Listen for exit earlier in test

* Rebase
2022-01-10 11:54:46 -05:00
Jeremy Rose
d44a187d0b
feat: remove nativeWindowOpen option (#29405)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-01-06 09:28:03 -08:00
Milan Burda
fe7f296339
refactor: remove duplicate contextIsolation from getWebPreference() (#31730) 2021-11-08 11:57:56 -05:00
Raymond Zhao
9e0e04da25
fix: second-instance additionalData parameter (#31661)
* test: second-instance additionalData parameter

* Fix posix implementation
2021-11-04 01:14:09 -07:00
Raymond Zhao
db0a152bc1
feat: Add data parameter to app.requestSingleInstanceLock() (#30891)
* WIP

* Use serialization

* Rebase windows impl of new app requestSingleInstanceLock parameter

* Fix test

* Implement posix side

* Add backwards compatibility test

* Apply PR feedback Windows

* Fix posix impl

* Switch mac impl back to vector

* Refactor Windows impl

* Use vectors, inline make_span

* Use blink converter

* fix: ownership across sequences

* Fix upstream merge from Chromium

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-10-14 21:32:32 -04:00
Samuel Attard
57d088517c
feat: add support for validating asar archives on macOS (#30667)
* feat: add support for validating asar archives on macOS

* chore: fix lint

* chore: update as per feedback

* feat: switch implementation to asar integrity hash checks

* feat: make ranged requests work with the asar file validator DataSourceFilter

* chore: fix lint

* chore: fix missing log include on non-darwin

* fix: do not pull block size out of missing optional

* fix: match ValidateOrDie symbol on non-darwin

* chore: fix up asar specs by repacking archives

* fix: maintain integrity chain, do not load file integrity if header integrity was not loaded

* debug test

* Update node-spec.ts

* fix: initialize header_validated_

* chore: update PR per feedback

* chore: update per feedback

* build: use final asar module

* Update fuses.json5
2021-09-09 14:49:01 -07:00
electron-roller[bot]
5513e66982
chore: bump chromium to 95.0.4612.5 (main) (#30503)
* chore: bump chromium in DEPS to 94.0.4604.0

* build: 3-way merge of chromium patches

* chore: bump chromium in DEPS to 94.0.4605.0

* build: 3-way merge of chromium patches

* 3076040: Reland Remove delete_children RemoveAllChildViews arg

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

* 3069287: Remove the remaining uses and delete the deprecated API

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

* 2297212: Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey()

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

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

* 3082756: Change transport_security_persister_path param to be a path to a file.

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

> this CL intentionally changes the name of the parameter
> in the network context parameters and the order of the constructor
> parameters to ensure all callers update their code to pass a full
> file path rather than a path to a directory.

The 'path' in this diff is already an absolute path, coming from
`CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));` at
08ff1c2cbf/shell/browser/electron_browser_context.cc (L126)

* iwyu: network::mojom::HttpRawHeaderPair

* fixup! 3076040: Reland Remove delete_children RemoveAllChildViews arg

Missed one.

* 2999884: CodeHealth: Remove DictionaryValue::GetStringWithoutPathExpansion

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2999884
(example of replacing GetStringWithoutPathExpansion() w/FindStringKey())

Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296
(removal of DictionaryValue::GetStringWithoutPathExpansion)

* 3059260: Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

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

We had both of these in a 'disable_features' list. Since these feature have
been removed upstream, remove them from our disable list, too.

IMPORTANT: this commit should not be backported to older branches that
still have these features, because doing so would un-disable them.

* 2920890: Load reroute_info from download in-progress and history db back into DownloadItem.

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

* 3039323: [Clipboard API] Clipboard Custom Formats implementation Part 5.

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

* chore: bump chromium in DEPS to 94.0.4606.0

* 3084502: Add a new PrintRasterizePdfDpi policy.

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

* chore: update patches

* chore: bump chromium in DEPS to 94.0.4606.3

* chore: bump chromium in DEPS to 95.0.4608.0

* chore: bump chromium in DEPS to 95.0.4609.0

* [DevTools] Remove report_raw_headers from network::ResourceRequest

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

* Remove content::WebContentsObserver::OnInterfaceRequestFromFrame

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

* Disable kDesktopCaptureMacV2

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

* Add a new PrintRasterizePdfDpi policy.

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

* chore: update patches

* chore: bump chromium in DEPS to 95.0.4609.3

* disable `use_lld` for macos

* chore: update patches

* Linux: use chrome_crashpad_handler instead of crashpad_handler

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

* chore: fix lint

* Revert "[DevTools] Remove report_raw_headers from network::ResourceRequest"

This reverts commit 28f4da1582d046e96cb58f3cbb590503e89dfd0d.

* [DevTools] Remove report_raw_headers from network::ResourceRequest (Attempt #2)

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

* DCHECK that predictor always has a non-empty NetworkIsolationKey.

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

* Remove --no-untrusted-code-mitigations from //content and //gin

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

* fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

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

* fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

* Convert PrintManager to RenderFrameHostReceiverSet.

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

* chore: bump chromium in DEPS to 95.0.4612.5

* chore: disable v8 oilpan

* [Compiler] Remove untrusted code mitigations.

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

* Remove most FTP logic from services/network.

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

* Rename scale_factor.h -> resource_scale_factor.h

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

* [GURL -> SiteForCookies] extensions/

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

* breadcrumbs: add desktop entry point

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

* Move args_ to private in ExtensionFunction

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

* chore: iwyu

* fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure

* Disable kDesktopCaptureMacV2

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

* fixup! [Compiler] Remove untrusted code mitigations.

* fixup! Disable kDesktopCaptureMacV2

* Revert "chore: disable v8 oilpan"

This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0.

* Reland "chore: disable v8 oilpan"

This reverts commit 1c252765b07a205560e7b5eed06de2605336e2d8.

The previous revert was to test on which platforms did the
heapsnapshot test actually fail.

* [Clipboard API] Clipboard Custom Formats implementation Part 5.

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

* Convert ExtensionFrameHost to RenderFrameHostReceiverSet.

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

* Convert PDFWebContentsHelper to RenderFrameHostReceiverSet.

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

* [Underscore Migration] Migrate ui/legacy

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

* chore: remove unknown permission error

* chore: fix lint

* chore: ignore -Wunreachable-code-return for node deps/

* fixup! chore: ignore -Wunreachable-code-return for node deps/

* fix: windows build

* fix: build dependency

Dependency was missed in cbeae20438

* 3108669: arm,dsp: Fix 8bpp Dct64_NEON().

https://chromium-review.googlesource.com/c/codecs/libgav1/+/3108669

* chore: revert libgav1 roll

* Revert "3108669: arm,dsp: Fix 8bpp Dct64_NEON()."

This reverts commit 7ed31323127aac8ba2eaff9cae6c9be9a4954f33.

* Revert "chore: revert libgav1 roll"

This reverts commit 084a490d298811267316c786762fe7aa91b6318d.

* chore: revert clang roll

* chore:  Fix -Wunreachable-code-aggressive warnings in arm and arm64 code

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: deepak1556 <hop2deep@gmail.com>
Co-authored-by: mlaurencin <mlaurencin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-08-23 20:52:17 -04:00
Shelley Vohr
a9a90fa1b6
fix: {exit|enter}-html-fullscreen emitted after esc in webview (#30537) 2021-08-17 09:03:45 +02:00
Robo
522b19e2d8
fix: crash when clicking links with target=_blank from webview (#29874) 2021-06-29 18:10:18 -07:00
electron-roller[bot]
b8261f1591
chore: bump chromium to 93.0.4550.0 (main) (#29751) 2021-06-22 12:17:16 -07:00
David Sanders
214fcfc46d
test: re-enable some skipped tests (#29655)
* test: re-enable some skipped tests

* test: enable more tests
2021-06-15 10:55:08 +09:00
Milan Burda
8040cb788f
test: add spec for --require filtering in NODE_OPTIONS (#29501) 2021-06-03 14:46:44 +09:00
David Sanders
d18dbdd72b
fix: add service worker schemes from command line in renderer (#29425) 2021-06-01 10:45:23 +09:00
Milan Burda
aea8d5325c
fix: webFrame spell checker APIs crashing in sandboxed renderers (#29053) 2021-05-10 14:19:23 +02:00
Cheng Zhao
b97b973306
test: worker should be able to load asar files (#28858) 2021-04-27 12:07:05 -04:00
Samuel Attard
79077f6df9
chore: remove app.allowRendererProcessReuse (#26874) 2021-04-21 13:59:11 -07:00
Jeremy Rose
4ca518468d
feat: remove BrowserWindow option inheritance (#28550) 2021-04-21 10:55:17 -07:00
Samuel Attard
f35fc93080
chore: rename process.contextIsolation to process.contextIsolated (#28259)
* chore: rename process.contextIsolation to process.contextIsolated

* thing
2021-03-18 14:00:19 -07:00
Milan Burda
fc7f2042ec
feat: add process.contextIsolation property (#28030) 2021-03-17 11:23:29 -07:00
Cheng Zhao
80f89a3472
test: disable some tests under ASan which might receive SIGKILL because of OOM (#28156)
* test: running child app under ASan might receive SIGKILL

* test: renderer process of webview might receive SIGKILL under ASan

* test: increase timeout for asan build
2021-03-16 17:02:47 -04:00
Milan Burda
5b205731f6
chore: remove deprecated remote module (#25734)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-03-09 17:12:40 -08:00
Cheng Zhao
b3a0743121
test: exit after app.relaunch is called (#28016) 2021-03-07 16:30:43 +09:00
John Kleinschmidt
afb7d9f550
fix: navigator.setAppBadge/clearAppBadge from a service worker (#27950) 2021-03-05 10:12:03 +09:00
Samuel Attard
186301e126
feat: enable context isolation by default (#26890)
* feat: enable context isolation by default

* chore: set default in ctx iso getter

* spec: make all specs work with the new contextIsolation default

* spec: fix affinity specs

* spec: update tests for new ctx iso default

* spec: update tests for new ctx iso default

* spec: update tests for new ctx iso default

* spec: update tests for new ctx iso default

* chore: move stray prod deps to dev deps

* spec: update tests for new ctx iso default

* turn off contextIsolation for visibility tests

* turn off contextIsolation for <webview> tag nodeintegration attribute loads native modules when navigation happens

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-03-01 16:52:29 -05:00
Milan Burda
4a5c5843c4
fix: <webview> not working with Trusted Types (#27445) 2021-01-25 10:29:25 +09:00
Cheng Zhao
cc136f2acd
fix: LC_ALL env should not be changed (#26507) 2020-11-18 11:13:01 +09:00
loc
0b85fdf26c
feat: add webContents.setWindowOpenHandler API (#24517)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2020-11-10 09:06:03 -08:00
Cheng Zhao
d3f32c7502
fix: set app locale after user's script is loaded (#26185)
* fix: set app locale after user's script is loaded

* fix: set LC_ALL env on Linux
2020-10-28 12:18:47 -04:00
Cheng Zhao
57dc170e81
fix: no more need to hijack process.stdout on Win32 (#25765) 2020-10-05 10:10:38 -07:00
bitdisaster
2cfa41e6e0
feat: read/write Toast Activator CLSID in shortcuts (#25493)
* read/write Toast Activator CLSID

* docs

* tests

* tweaks
2020-09-17 15:17:44 -07:00
John Kleinschmidt
7c10f86c6e
ci: cleanup up test app directories (#25145)
* ci: cleanup up test app directories

* ci: use electron prefix for a testing apps so that the can be cleaned up

* Revert "ci: cleanup up test app directories"

This reverts commit a47daba812ee95f506cac0f1bfedda8be7b4e2f0.

* fixup test due to app name change
2020-08-31 14:07:12 -04:00
Robo
b6321cc22d
fix: crash when navigating from a page with webview that has inherited zoom level (#24757)
* fix: cleanup webview zoom level observers on navigation

* add spec

* webview should be on same partition

* wait for webview to finish loading
2020-07-28 13:00:44 -07:00
Samuel Attard
b500294c1d
feat: add worldSafe flag for executeJS results (#24114)
* feat: add worldSafe flag for executeJS results

* chore: do not log warning for webContents.executeJS

* Apply suggestions from code review

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

* chore: apply PR feedback

* chore: split logic a bit

* chore: allow primitives through the world safe checl

* chore: clean up per PR feedback

* chore: flip boolean logic

* chore: update per PR feedback

* chore: fix typo

* chore: fix spec

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2020-07-23 14:32:20 -07:00
Samuel Attard
16a3f41fd3
chore: add deprecation warning for the default of contextIsolation (#23507)
* chore: add deprecation warning for the default of contextIsolation

* chore: add to breaking changes

* Update docs/breaking-changes.md

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

* chore: fix specs on windows

Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
2020-06-25 10:55:17 -07:00
Robo
7cc780d077
fix: let Node.js perform microtask checkpoint in the main process (#24131)
* fix: let Node.js perform microtask checkpoint in the main process

* fix: don't specify v8::MicrotasksScope for explicit policy

* fix: remove checkpoint from some call-sites

We already perform checkpoint at the end of a task,
either through MicrotaskRunner or through NodeBindings.
There isn't a need to add them again when calling into JS
except when dealing with promises.

* fix: remove checkpoint from some call-sites

We already perform checkpoint at the end of a task,
either through MicrotaskRunner or through NodeBindings.
There isn't a need to add them again when calling into JS
except when dealing with promises.

* fix incorrect specs

* default constructor arguments are considered for explicit mark

* add regression spec
2020-06-17 10:08:10 -07:00
Paul Frazee
c6c022dc46
feat: add {stream} opt to custom protocol registry to configure media player (#22955) 2020-06-08 09:49:36 -07:00
Shelley Vohr
ac81a39e09
fix: compensate for lazy-loaded circular deps (#23890) 2020-06-03 10:29:08 -07:00
Cheng Zhao
5918dd6e65
test: wait for beforeunload handler to be installed (#23874) 2020-06-02 11:32:39 +09:00
Cheng Zhao
08f288faf1
test: use WebContents event to test beforeunload (#23699) 2020-05-26 09:21:38 -04:00
Cheng Zhao
0dabd5e8c7
test: more logging in node inspector test (#23746) 2020-05-26 10:20:16 +09:00
Robo
a707a3eda3
feat: add enableWebSQL webpreference (#23311)
* feat: add enableWebSQL webpreference

* chore: update indexedDB test
2020-05-06 12:52:59 -07:00
Samuel Attard
abe5cf398c
refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
2020-04-27 12:46:04 -07:00
Jeremy Apthorp
6fa05dd123
test: refactor crashReporter tests (#23178) 2020-04-22 15:53:12 -07:00
Charles Kerr
07654c47ec
fix: use Node's microtasks policy in node_main.cc (#23153)
Fixes #21515.
2020-04-21 12:18:22 -07:00
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Samuel Attard
b87b501161
build: update eslint + eslint plugins (#22777)
* build: run eslint --fix

* chore: manually fix all hasOwnProperty errors

* chore: manually fix all void 0 vs undefined errors

* chore: manually fix all async-in-promise errors

* chore: manually fix lexical declaration in case block
2020-03-20 11:12:18 -04:00
Electron Bot
39baf68790
chore: bump chromium to 5b340c815ce15ab2efcf277ed19e9 (master) (#22064)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: loc <andy@slack-corp.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-03-03 13:35:05 -08:00
Samuel Attard
12c1d4411d
chore: add deprecation warning on setting app.allowRendererProcessReuse to false (#22337)
* chore: add deprecation warning on setting app.allowRendererProcessReuse to false

* fix: no deprecation warnings in process reuse spec

* chore: add test for new deprecate removeProperty behavior
2020-02-26 14:03:52 -08:00
Jeremy Apthorp
a25d7fa440
fix: emit will-navigate for sandboxed contents (#22188) 2020-02-21 11:08:26 -08:00
Jeremy Apthorp
d590f2efe3
feat: enable pdf viewer (#21794) 2020-02-12 16:39:12 -08:00
Charles Kerr
c83f836faf
refactor: prefer using app.whenReady() (#21972)
* docs: add references to app.whenReady() in isReady

* refactor: prefer app.whenReady()

In the docs, specs, and lib, replace instances of `app.once('ready')`
(seen occasionally) and `app.on('ready')` (extremely common) with
`app.whenReady()`.

It's better to encourage users to use whenReady():
1. it handles the edge case of registering for 'ready' after it's fired
2. it avoids the minor wart of leaving an active listener alive for
an event that wll never fire again
2020-02-03 22:43:22 +00:00
Electron Bot
2b53788c35
chore: bump chromium to 4b6692e4cc2839729bb7ac009586a (master) (#21864)
* chore: bump chromium in DEPS to a1ea0d7aedd6b5fe58fbabfa3b05aa8ee41304ff

* update patches

* update extensions code

* Remove WebPoint

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

* fix build

* chore: bump chromium in DEPS to 9351e26c2a3714f8bbb10789c71bb51b0b494c75

* update patches

* Remove error description from the DidFailLoadWithError message

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

* Make SimpleNetworkHintsHandlerImpl use the right NetworkIsolationKey

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

* Rename libgtkui to gtk

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

* [metrics] Remove histogram Startup.WarmStartTimeFromRemoteProcessStart*.

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

* fix requestSingleInstanceLock test

* chore: bump chromium in DEPS to a813567a4f17ea08292c2b26fa10d0ffd47010d9

* chore: bump chromium in DEPS to f0aca2de536ceecd6eb66e928051d11e6d11991f

* chore: bump chromium in DEPS to 865556af6d0c9d990f5b1816cb792f7c3859667b

* chore: bump chromium in DEPS to 98538fdd28c4b6692e4cc2839729bb7ac009586a

* update patches

* fix broken tests

* Update node tests for v8 changes

* Update node patches for test failures

* Update for number of tests

Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
2020-01-29 07:01:37 -05:00
Jeremy Apthorp
768a6ace1b
test: move some fixtures from spec/ to spec-main/ (#21403) 2020-01-09 11:50:56 -08:00
Cheng Zhao
f9a1dc10fe
fix: quit after Chromium is fully started (#21488)
* fix: quit when chromium is fully started

* test: remove hacks on app.quit

* chore: RunUntilIdle is unnecessary
2019-12-13 18:57:02 +09:00
loc
5cecc230fb fix: restore POST forms that open a new window with target=_blank (#21469)
* fix: restore parts of original ResourceRequestBody V8 conversion

Restore some of the original conversion logic in order to fix target=_blank post form submissions.

* test: add test for POST form submission
2019-12-11 15:46:25 +09:00