Commit Graph

337 Commits

Author SHA1 Message Date
Milan Burda
fc468cce3b test: skip remote module related tests when enable_remote_module = false (#23557) 2020-05-13 20:05:44 +02:00
Felix Rieseberg
dcbed18f44 feat: app.getPath('recent') (#23381)
* feat: getPath("recent")

* test: Add a spec and docs

* fix: Integrate feedback

* fix: Handle path change

* chore: Cut SetRecentPath
2020-05-13 11:27:56 +09:00
Samuel Attard
7f9b7b2e95 chore: clean up context bridge scopes and add specs for internal bridge (#23334)
* chore: clean up context bridge context scopes

* spec: add specs for internalContextBridge
2020-05-11 13:41:42 -07:00
Milan Burda
653c36b8c9 test: skip "handles Promise timeouts correctly" when ELECTRON_RUN_AS_NODE is disabled (#23415) 2020-05-11 14:19:39 -04:00
Alexey Kuzmin
dc3de49a08 spec: fix conditions for some tests (#23489) 2020-05-11 10:46:45 +09:00
Pavel Feldman
3c132dc445 chore: handle Browser.close over CDP (#23436) 2020-05-08 16:13:32 -07:00
Samuel Attard
091f45b879 chore: fix linting (#23473) 2020-05-08 11:30:37 -07:00
Samuel Attard
21900fe4f4 fix: do not initialize any extension related logic in OffTheRecord contexts (#22772) 2020-05-08 11:17:28 -07:00
Pavel Feldman
93f6129c80 chore: support --remote-debugging-pipe (#23433) 2020-05-07 21:27:55 -07:00
Jeremy Apthorp
06bf0d08dc fix: crashReporter incompatible with sandbox on Linux (#23265) 2020-05-07 13:31:26 -07:00
Robo
a707a3eda3 feat: add enableWebSQL webpreference (#23311)
* feat: add enableWebSQL webpreference

* chore: update indexedDB test
2020-05-06 12:52:59 -07:00
Sorah Fukumori
f176d2494f fix: respect system language preferences on Win/macOS (#23247)
This commit fixes https://github.com/electron/electron/issues/18829

Previously the full preferences set to OS was not given to Chromium.

Also, this commit improves fallback font selection for CJK text.
Chromium uses browser languages to determine fallback fonts on Windows,
especially kanji/han characters in CJK.

For instance, when user sets 'en-US, ja-JP' to Accept-Language,
while Chromium chooses Japanese font for kanji text, but Electron
chooses Chinese font.  This is because only the first language was given
to Accept-Language on Electron.

This patch is based on https://github.com/electron/electron/pull/15532

Co-authored-by: Nitish Sakhawalkar <nitsakh@icloud.com>
Co-authored-by: Kasumi Hanazuki <kasumi@rollingapple.net>

Co-authored-by: Nitish Sakhawalkar <nitsakh@icloud.com>
Co-authored-by: Kasumi Hanazuki <kasumi@rollingapple.net>
2020-05-04 10:49:29 -07:00
shelley vohr
0f0cc51b35 refactor: return null when passing empty menu templates (#23364) 2020-05-04 08:19:21 -07:00
Jeremy Apthorp
8d0a612265 refactor: remove code for non-native extensions shim (#23340) 2020-04-30 09:38:09 -07:00
shelley vohr
f50f725a9c fix: prevent Menu.buildFromTemplate with empty array (#23308)
Prevent issues with menu creation and subsequent pane focus from menu bar by preventing menus from being created from an empty array. I can't conceive a valid use case for this, since if one wants to remove a menu they should be be passing null to win.setMenu() or calling win.removeMenu(). This issue is also specific to top-level menus, and not submenus, so the new check and exception is scoped to top-level menus.
2020-04-30 08:29:02 -07:00
Jeremy Apthorp
176a120ec2 test: fix crashReporter test on woa (#23242)
* test: fix crashReporter test on woa

* disable some tests on woa
2020-04-23 16:08:50 -04:00
Cheng Zhao
cb6a1e2c5e fix: set default menu in will-finish-launching event (#23214) 2020-04-23 10:51:31 -07:00
Jeremy Apthorp
6fa05dd123 test: refactor crashReporter tests (#23178) 2020-04-22 15:53:12 -07:00
Samuel Attard
96bf9ce77f refactor: port parts of window-setup to use ctx bridge instead of being run in the main world (#23194)
* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world

* chore: update ctx bridge specs for new base numbers
2020-04-22 12:42:51 -07:00
Jeremy Apthorp
c798a6e5d1 fix: block custom window.open when nativeWindowOpen is true (#23188) 2020-04-22 10:48:54 -07:00
Samuel Attard
0cbcee6740 fix: ensure that functions are not retained beyond their context being released (#23207) 2020-04-21 18:05:01 -07:00
loc
aca2e4f968 refactor: improve feature string parsing (#23130)
* test: add pre-change snapshot of new-window event

* move to .ts file for easier diff

* refactor: improve feature string parsing logic

* test: update snapshots

* update type names per review

* update comma-separated parse test

* use for loop instead of reduce per review

* tighten up types

* avoid variable guest contents id returnValue in test snapshot
2020-04-21 16:23:00 -04:00
loc
a041882192 test: add test for datalist autofills (#23110)
* test: add test for datalist autofills

* address style nits

* move fixture to spec-main
2020-04-21 12:28:31 -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
Shelley Vohr
f3dc3997b1 feat: support fullScreen BrowserWindow property (#23145) 2020-04-20 20:25:18 -07:00
Shelley Vohr
ba3928103f spec: fix type errors in devToolsWebContents (#23187) 2020-04-20 16:51:27 -07:00
Jeremy Apthorp
2541d62486 chore: remove disable_user_gesture... patch (#23066) 2020-04-16 15:22:39 -07:00
Samuel Attard
e4c82fdf2d Merge pull request from GHSA-h9jc-284h-533g 2020-04-16 14:10:18 -07:00
Electron Bot
3e8d77d564 chore: bump chromium to 98ebf6c3f0b7bd96bdb1a4b42208f (master) (#22999)
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Electron Bot <anonymous@electronjs.org>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-04-13 16:39:26 -07:00
loc
5154e8ff75 fix: enable workaround for nativeWindowOpen hang (#22825) 2020-04-13 11:37:41 -04:00
Robo
abbe7417f2 chore: fix type check in systemPreferences module specs (#23064) 2020-04-09 15:55:47 -07:00
Cheng Zhao
ca947307db chore: make WebContentsView take webPreferences as parameter (#22997)
* chore: add WebContentsView.webContents helper

* chore: no need to handle webContents option

* chore: Create WebContentsView in C++

* chore: make WebContentsView accept web_preferences

* fix: nativeWindowOpen still passes WebContents to BrowserWindow

* chore: no more need of WebContentsViewRelay

* test: WebContentsView now takes options

* fix: avoid creating 2 constructors
2020-04-09 16:01:16 +09:00
Samuel Attard
0d2e967960 feat: expose electron/{process} typed modules (#22937)
* feat: expose electron/{process} typed modules

* chore: update imports for common modules

* chore: update typescript generator

* chore: remap electron/* to the internal packages
2020-04-06 17:04:09 -07:00
Jeremy Apthorp
0a78ab4b98 refactor: ginify DownloadItem (#22924) 2020-04-02 17:22:46 -07:00
Jeremy Apthorp
6159066c26 refactor: ginify Menu (#22916) 2020-04-02 16:07:56 -07:00
Samuel Attard
1d158399a6 feat: expose the sameSite value for cookies (#22789)
* feat: expose the sameSite value for cookies

* Apply suggestions from code review

Co-Authored-By: Charles Kerr <ckerr@github.com>

* Apply suggestions from code review

Align with cookie samesite values for the extensions API

https://developer.chrome.com/extensions/cookies#type-SameSiteStatus

* chore: add tests for sameSite cookies get/set

* chore: update docs parser

* chore: update docs for MessageChannel and MessagePort to have correct process information

* chore: remove LOG warning

* chore: throw error if the string->samesite conversion fails

Co-authored-by: Charles Kerr <ckerr@github.com>
2020-04-02 11:28:43 -07:00
Shelley Vohr
da67cbf551 feat: add property support for remainder of BrowserWindow (#22771)
Adds property-based support for the remainder of primitive gette/setter pairs on `BrowserWindow`.

Namely:
- `win.simpleFullScreen`
- `win.title`
- `win.visibleOnAllWorkspaces`
- `win.documentEdited`
- `win.representedFilename`
- `win.shadow`
- `win.kiosk`
- `win.menuBarVisible`
2020-04-01 08:22:32 -07:00
Cheng Zhao
14051ff945 test: do not trigger unhandled promise rejections (#22922) 2020-04-01 09:45:39 -04:00
Cheng Zhao
e6f2605ad0 fix: webRequest module should work with file:// protocol (#22903)
* fix: override file:// instead of intercepting

* test: webRequest module should work with file://

* fix: service work with file:// url

* fix: original_response_headers can be null

* fix: only register file:// when necessary
2020-04-01 16:38:40 +09:00
Robo
bac1c7f532 fix: ensure standard schemes are registered in nw service process (#22867)
* fix: ensure standard schemes are registered in nw service process

Refs https://github.com/electron/electron/pull/20546

* chore: add test

* chore: apply suggestions from code review

Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>

Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
2020-03-31 19:33:16 -07:00
Jeremy Apthorp
765c08c600 refactor: ginify Notification (#22821) 2020-03-31 11:42:32 -07:00
Samuel Attard
fea3366bc7 fix: propagate preferred color scheme to the renderer (#22896)
* fix: do not crash if the window is closed syncronously with a nativeTheme change

* fix: propogate preferred color scheme to the renderer and keep it up to date
2020-03-30 15:39:50 -07:00
Jeremy Apthorp
a3e28788ce refactor: ginify Tray (#22822)
* refactor: ginify Tray

* lint

* improve argument parsing logic

* remove redundant imports from tray.js

* new Tray produces an instanceof Tray

* make Constructible generic

* lint

* clean up on exit
2020-03-30 10:32:02 +09:00
Jeremy Apthorp
ac501e8194 fix: heap-use-after-free in tray.popUpContextMenu (#22842) 2020-03-26 18:30:21 -07:00
Heilig Benedek
74372d65ae feat: enhance native window.open to match the custom implementation's behavior (#19703)
Co-authored-by: Andy Locascio <andy@slack-corp.com>
2020-03-26 11:05:45 -07:00
Jeremy Apthorp
b327478cf0 fix: prevent remote from messing with constructor names (#22820) 2020-03-25 13:13:10 -07:00
CezaryKulakowski
bdef77bad8 fix: don't allow window to go behind menu bar on mac (#22770) 2020-03-25 11:13:43 +09:00
Jeremy Apthorp
07cd70a37e refactor: ginify powerMonitor (#22751) 2020-03-24 09:03:29 -07:00
Samuel Attard
e678794dd0 build: fix beta version bumper logic for betas beyond 10 (#22810) 2020-03-24 09:04:12 -04:00
Samuel Attard
af46c1ed8d fix: allow net requests to use Same-Site cookies (#22788) 2020-03-20 16:39:03 -07:00