Commit graph

976 commits

Author SHA1 Message Date
Alice Zhao
e9a93a8c5c
fix: setTopBrowserView focus issue with reordering (#42653)
* fix: reorder top browser view instead of adding/removing

* fix: update browserViews order

* test: add a test for setTopBrowserView
2024-07-01 11:36:04 +02:00
Alice Zhao
406f644d26
feat: duplicate navigation related APIs to contents.navigationHistory (#41752)
* refactor: move navigation related api to navigationHistory

* docs: add deprecation messages to old web content methods

* fix: add deprecation warnings to webcontents

* fix: add deprecation warnings and make existing naviagation apis internal

* Update docs/api/web-contents.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* Update docs/api/web-contents.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* Update docs/api/web-contents.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* Update docs/api/web-contents.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* docs: fix links

* docs: add breaking change to 31

* docs: move breaking change to 32

* chore: re-run pipeline

---------

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
2024-06-05 09:34:47 -07:00
Anny Yang
5fb117a7d7
fix: don't destroy BrowserView webContents when owning BrowserWindow hasn't been closed (#42353)
* fix: moves bv webContents close to closed event

* chore: adds unit tests

* chore: test that bv webContents are destroyed when parent bw closed
2024-06-05 09:58:38 +02:00
Shelley Vohr
9f88820be9
fix: dialogs should work with BaseWindows internally (#42315) 2024-05-31 12:04:22 +02:00
Shelley Vohr
d0cb298f95
fix: webContents.navigationHistory should be enumerable (#42139)
fix: webContents.navigationHistory should be enumerable
2024-05-14 16:47:47 -04:00
Shelley Vohr
c765d57265
fix: BrowserView autoresizing conversion error (#42056) 2024-05-13 10:27:01 +02:00
Jeremy Rose
4e8c28fdf0
fix: data corruption in protocol.handle (#41894) 2024-04-22 13:40:01 -07:00
Jeremy Rose
67ba30402b
refactor: JSify BrowserWindow unresponsive handling (#37902) 2024-04-18 13:14:07 -07:00
Alice Zhao
00e3445f8a
feat: add navigationHistory.getEntryAtIndex(int index) method (#41577) 2024-03-21 14:59:23 -07:00
Shelley Vohr
d5912fd05a
fix: webContents.print options should be optional (#41467) 2024-02-29 10:19:44 -05:00
Krzysztof Halwa
a0dad83ded
feat: Allow creation of new window to be customizable. (#41432) 2024-02-29 10:15:01 -05:00
Henrik Gaßmann
80906c0adb
fix: properly stream uploadData in protocol.handle() (#41052)
* refactor(protocol): extract file stream factory

Increase readability by moving the file stream creation logic out of the
`uploadData` to request body conversion function.

* fix: properly flatten streams in `protocol.handle()`

Refs: electron/electron#39658

* fix: `protocol.handle()` filter null origin header

Refs: electron/electron#40754

* fix: remove obsolete TODO comment

Refs: electron/electron#38929

* fix: forward `Blob` parts in `protocol.handle()`

Refs: electron/electron#40826

* fix: explicitly error out on unknown chunk parts
2024-02-16 14:29:29 -05:00
marekharanczyk
398ca2a019
fix: make sure invalid URL loads promises are fulfilled. (#41194)
* fix: make sure invalid URL loads promisses are fulfilled.

* fixup! fix: make sure invalid URL loads promisses are fulfilled.
2024-02-05 16:36:51 +09:00
Shelley Vohr
6df3443617
fix: validate printToPDF margins against pageSize (#41157)
fix: validate margins against pageSize
2024-01-31 10:48:41 +01:00
Shelley Vohr
6786fde576
docs: document printToPDF generateDocumentOutline option (#41156)
* doc: document printToPDF generateDocumentOutline option

* doc: ready event to whenReady
2024-01-30 09:55:03 -06:00
Maikel Ortega Hernández
a05bfd332d
fix: on error, reset spawnedProcess (#41033)
reset spawnedProcess instance in case of error
2024-01-24 16:45:08 -06: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
Jeremy Rose
15c6014324
feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
Tamás Zahola
a94fb2cb5d
fix: don't reject loadURL() promise from did-fail-load - use did-finish-load instead (#40661) 2023-12-12 11:45:14 -08:00
Jeremy Rose
85bc005cd6
refactor: move JS dialog handling to JS (#40598) 2023-12-05 17:36:23 -08:00
David Sanders
cf5f0419f1
chore: fix some typos (#40506) 2023-11-12 19:51:56 -08:00
Milan Burda
0f68d845f9
refactor: AutoUpdater for Windows using async/await (#40289) 2023-11-07 14:55:22 -08: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
Milan Burda
f66d4c7ee0
fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -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
Milan Burda
657e88b173
chore: remove deprecated crashed and renderer-process-crashed events (#40115) 2023-10-18 12:05:41 +02:00
Milan Burda
2c88626b51
chore: revert deprecate as an internal module (#40146)
Revert "chore: restore deprecate as an internal module (#40124)"

This reverts commit 737e3de3fa.
2023-10-10 11:50:47 -04:00
Milan Burda
737e3de3fa
chore: restore deprecate as an internal module (#40124)
* Revert "refactor: don't expose deprecate as an internal module (#35311)"

This reverts commit 8424779906.

* check crashed event warnings
2023-10-09 08:55:16 +09:00
Milan Burda
83a928f6e3
fix: crashed events deprecation (#40090) 2023-10-05 19:57:14 -04:00
Shelley Vohr
c8156c3c57
fix: failure on immutable webContents.print(options) (#39985)
fix: failure on immutable webContents.print(options)
2023-09-28 10:41:46 +02:00
Milan Burda
c9eb3deab5
chore: remove deprecated scroll-touch-{begin,end,edge} events (#39814)
* chore: remove deprecated `scroll-touch-{begin,end,edge}` events

* update spec/ts-smoke

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-20 17:41:29 -04:00
David Sanders
aceb432f45
chore: remove deprecated systemPreferences APIs (#39696) 2023-09-11 11:34:13 -04:00
Milan Burda
f6e8544ef6
refactor: use replaceAll() instead of replace() when appropriate (#39721)
refactor: use replaceAll() instead of replace() when appropriate
2023-09-07 15:50:14 +09:00
David Sanders
c96bb9958f
chore: remove deprecated webContents.getPrinters() (#39663) 2023-09-05 10:16:41 +02:00
Milan Burda
0b0707145b
refactor: replace .forEach() with for-of (#39691)
* refactor: replace `.forEach()` with `for-of`

* refactor docs/fiddles/features/web-hid/renderer.js
2023-08-31 23:36:43 +09:00
Tomasz
f30fbebb98
fix: promise resolved to early when browser initiated in-page navigation v2 (#39597) 2023-08-28 12:37:28 -04:00
Shelley Vohr
2affecd4dd
feat: allow generating accessible pdf with printToPDF (#39563)
* feat: allow generating accessible pdf with printToPDF

* docs: mark generateTaggedPDF experimental
2023-08-24 11:01:59 -04:00
Milan Burda
90865fa97d
chore: remove deprecated getTrafficLightPosition() / setTrafficLightPosition() (#39479)
chore: remove deprecated getTrafficLightPosition() / setTrafficLightPosition()
2023-08-21 15:58:09 +02:00
David Sanders
1b3e4dae8d
chore: document deprecated systemPreferences APIs (#39343)
* chore: document deprecated systemPreferences APIs

* chore: forgot systemPreferences.appLevelAppearance

* test: expect deprecation messages
2023-08-14 11:34:04 +02:00
Shelley Vohr
117d5310f5
revert: promise resolved too early when browser initiates in-page navigation (#39481)
This reverts commit a0effaf9b8.
2023-08-14 13:13:15 +09:00
Tomasz
a0effaf9b8
fix: promise resolved to early when browser initiated in-page navigation (#39260) 2023-08-09 16:06:39 +02:00
Milan Burda
3d45429667
refactor: use for-of instead of for simple array iteration (#39338) 2023-08-07 11:30:15 +02:00
Milan Burda
724f90a2a7
refactor: throw errors directly in async functions (#39233) 2023-07-31 10:39:37 +02:00
Milan Burda
455f57322f
refactor: use TypeError instead of generic Error when appropriate (#39209)
refactor: use TypeError instead of generic Error when appropriate
2023-07-25 12:08:46 -04:00
Milan Burda
2c52eb7e1c
refactor: replace .indexOf() with .includes() (#39195) 2023-07-24 12:32:54 +02:00
Shelley Vohr
b142fce229
fix: protocol.handle not intercepting file protocol (#39048)
fix: protocol.handle not intercepting file protocol
2023-07-12 11:42:49 +02:00
Samuel Attard
499d893040
feat: add support for keyboard initialized menu popup (#38903)
* feat: add support for keyboard initialized menu popup

* Update docs/api/menu.md

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

* fix: add patch to chromium for keyboard accessibility menu behavior

* refactor: s/initiatedByKeyboard/sourceType

* fix: ignore initial mouse event to retain keyboard initiated focus

* Update docs/api/menu.md

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
2023-06-29 15:54:06 -07:00
Milan Burda
607e71d563
refactor: replace Object.prototype.hasOwnProperty() with Object.hasOwn() (#38929) 2023-06-27 16:57:33 -04:00
Milan Burda
81a454d148
chore: re-enable node/no-deprecated-api linting (#38899)
* chore: re-enable node/no-deprecated-api linting

* chore: re-enable no-global-assign linting
2023-06-26 13:51:59 -04:00
Shelley Vohr
10852b3fd5
fix: preferCSSPageSize error type (#38761)
fix: preferCSSPageSize error type
2023-06-14 10:49:00 -04:00