Commit graph

57 commits

Author SHA1 Message Date
Jeremy Apthorp
6fa05dd123
test: refactor crashReporter tests (#23178) 2020-04-22 15:53:12 -07:00
Shelley Vohr
f3dc3997b1
feat: support fullScreen BrowserWindow property (#23145) 2020-04-20 20:25:18 -07:00
Jeremy Apthorp
2541d62486
chore: remove disable_user_gesture... patch (#23066) 2020-04-16 15:22:39 -07: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
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
CezaryKulakowski
bdef77bad8
fix: don't allow window to go behind menu bar on mac (#22770) 2020-03-25 11:13:43 +09: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
Shelley Vohr
97d8caa1e0
chore: support props/fns for BrowserWindow (#22686) 2020-03-16 14:03:35 -07:00
Shelley Vohr
1b353d1ed3
chore: revert deprecated WebContents properties (#22640)
* chore: revert deprecated WebContents properties

* Fix failing zoomFactor test
2020-03-13 10:16:08 -07:00
Samuel Attard
3e2cec83d9
feat: programmatically modify traffic light positioning (#22533)
* setter

* getter

* specs and docs

* fixup

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2020-03-05 14:22:12 -08:00
CezaryKulakowski
0bc906853e
fix: call focus on native window on call to webContents.focus on mac (#22323)
* fix: call focus on native window on call to webContents.focus on mac

On mac call to web_contents()->Focus() is not enough so it's
necessary to call it on native window.

* fixup! fix: call focus on native window on call to webContents.focus on mac

* fixup! fix: call focus on native window on call to webContents.focus on mac

* test: close all windows after test

* fix: also match the behavior on Linux

Co-authored-by: Cheng Zhao <zcbenz@github.com>
2020-03-02 16:51:02 +09:00
Shelley Vohr
2c974915a3
fix: do not call close on sheets themselves (#22410) 2020-02-28 23:10:21 +00:00
Samuel Attard
7b7def7d1e
feat: set app.enableRendererProcessReuse to true by default (#22336)
* feat: set app.enableRendererProcessReuse to true by default

* chore: add context aware info to breaking changes doc

* spec: fix nodeIntegration in child windows test for rendererprocessreuse

* spec: fix remote listeners in destroyed renderers spec as the error is now async

* Update api-browser-window-spec.ts

* chore: deprecate affinity

* chore: fix docs

* spec: handle tests crashing without an exist code

* spec: update tests for new rendererprocessreuse default

* spec: with renderer process re-use we get to destroy less views
2020-02-24 18:11:06 -08:00
Jeremy Apthorp
a25d7fa440
fix: emit will-navigate for sandboxed contents (#22188) 2020-02-21 11:08:26 -08:00
Cheng Zhao
9ad6f06831
fix: remove cyclic references of BrowserWindow (#22006)
* fix: remove cyclic references in BrowserWindow

* fix: prevent TopLevelWindow from garbage collection

* test: garbage collection of BrowserWindow

* chore: createIDWeakMap is used in tests
2020-02-11 09:37:46 +09:00
Jeremy Apthorp
b77f701aeb
feat: disable the remote module by default (#22091) 2020-02-10 10:49:09 -08:00
Jeremy Apthorp
a061c87e56
feat: enable native extensions support (#21814) 2020-02-03 14:01:10 -08:00
Cheng Zhao
36fac7bfec
fix: call SetCanActivate in setFocusable (#21846) 2020-01-22 10:13:48 +09:00
Cheng Zhao
42d8933d66 fix: crash when restoring minimized hidden window (#21813) 2020-01-17 11:29:01 -08:00
Jeremy Apthorp
768a6ace1b
test: move some fixtures from spec/ to spec-main/ (#21403) 2020-01-09 11:50:56 -08:00
Jeremy Apthorp
54b4756a29
refactor: try just using regular [Sync] for MessageSync (#20797) 2019-12-17 11:35:28 -08:00
Victor Bennich
cf833a7650 feat: add win.getBackgroundColor() for macOS (#21448)
thanks @vbennich - great work on this 🌟
2019-12-13 11:08:30 -05:00
Electron Bot
49b47ee4ed chore: bump chromium to f755b70e34659441e72c1a928a406 (master) (#21000) 2019-12-10 16:22:35 -08:00
Samuel Attard
ee58d60612
fix: ensure no node globals passively leak when nodeIntegration is disabled (#21342) 2019-12-02 10:09:47 -08:00
Jeremy Apthorp
f09cb114e4
test: retry beforeunload tests up to 3 times (#21293) 2019-11-27 09:42:54 -08:00
Jeremy Apthorp
26ecf63ab4
test: remove a bunch of usage of the remote module (#21119) 2019-11-14 14:09:03 -08:00
Samuel Attard
24939e8fa4
build: speedy tests on circle by splitting the test files into multiple jobs (#21015)
* build: let circleci divide our test suites in two

* well our tests rely on side affects, thats cool I guess
2019-11-06 16:15:55 -08:00
Jeremy Apthorp
ecd9e1f26e
chore: lint spec-main (#20835) 2019-11-01 13:37:02 -07:00
Jeremy Apthorp
6781d5e3c8
test: there is only --ci (#20794) 2019-10-30 16:38:21 -07:00
Cheng Zhao
eb0e55c514
chore: remove native_mate (Part 9) (#20645)
* refactor: remove a few uses of native_mate/gfx_converter.h

* refactor: deprecate mate::EventEmitter

* refactor: add gin_helper::EventEmitter

* refactor: convert a few classes to use gin_helper::EventEmitter

* refactor: get rid of native_mate_converters/gfx_converter.h

* fix: follow native_mate on reporting errors

* fix: gin is weak at guessing parameter types

* fix: incorrect full class name

* fix: gin::Handle does not accept null
2019-10-21 16:05:40 +09:00
Jeremy Apthorp
9f23bb581e
test: fix BrowserWindow spec to await its result (#20612) 2019-10-18 16:23:33 -07:00
Electron Bot
3ac3fbdbfb chore: bump chromium to e049d599a8332b9b2785b0178be74 (master) (#20314) 2019-10-18 12:57:34 -07:00
Jeremy Apthorp
8de925c4c2
test: move module tests to main process (#20419) 2019-10-09 16:33:15 -07:00
Jeremy Apthorp
2fad53e66b refactor: use v8 serialization for ipc (#20214)
* refactor: use v8 serialization for ipc

* cloning process.env doesn't work

* serialize host objects by enumerating key/values

* new serialization can handle NaN, Infinity, and undefined correctly

* can't allocate v8 objects during GC

* backport microtasks fix

* fix compile

* fix node_stream_loader reentrancy

* update subframe spec to expect undefined instead of null

* write undefined instead of crashing when serializing host objects

* fix webview spec

* fix download spec

* buffers are transformed into uint8arrays

* can't serialize promises

* fix chrome.i18n.getMessage

* fix devtools tests

* fix zoom test

* fix debug build

* fix lint

* update ipcRenderer tests

* fix printToPDF test

* update patch

* remove accidentally re-added remote-side spec

* wip

* don't attempt to serialize host objects

* jump through different hoops to set options.webContents sometimes

* whoops

* fix lint

* clean up error-handling logic

* fix memory leak

* fix lint

* convert host objects using old base::Value serialization

* fix lint more

* fall back to base::Value-based serialization

* remove commented-out code

* add docs to breaking-changes.md

* Update breaking-changes.md

* update ipcRenderer and WebContents docs

* lint

* use named values for format tag

* save a memcpy for ~30% speedup

* get rid of calls to ShallowClone

* extra debugging for paranoia

* d'oh, use the correct named tags

* apparently msstl doesn't like this DCHECK

* funny story about that DCHECK

* disable remote-related functions when enable_remote_module = false

* nits

* use EnableIf to disable remote methods in mojom

* fix include

* review comments
2019-10-09 13:59:08 -04:00
Milan Burda
ead8f2bbcd fix: BrowserWindow.fromWebContents() can return null (#19983) 2019-09-27 13:07:55 +02:00
Shelley Vohr
3ec17a88ba
fix: crash when exiting simple fullscreen on macOS (#20144) 2019-09-12 13:38:16 -04:00
Kuts Alexey
cddbddc543 feat: HTTP preconnect feature minimal for electronjs (#18671) 2019-08-26 09:47:32 -07:00
loc
f7e3e1f97a fix: mitigate white screen flash after occlusion by disabling compositor recycling (#19873)
* fix: remove white screen flicker by disabling compositor recycling

* chore: disable spec whose flakiness was made obvious by this patch
2019-08-22 15:16:06 -07:00
Julien Isorce
680399f476 feat: Implement BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId) (#18926)
* feat: Implement BrowserWindow.moveAbove(mediaSourceId)

BrowserWindow.{focus,blur,moveTop}() are not enough in some
situations. For example when implementing an overlay that
follows another window that can lose focus. In that case
it is useful to move the overlay above the tracked window.

sourceId is a string in the format of DesktopCapturerSource.id,
for example "window:1869:0".

Notes: Added BrowserWindow.moveAbove(mediaSourceId)

https://github.com/electron/electron/issues/18922

* feat: Implement BrowserWindow.getMediaSourceId

Return the Window id in the format of DesktopCapturerSource's id.
For example "window🔢0".

https://github.com/electron/electron/issues/16460

Notes: Added BrowserWindow.getMediaSourceId
2019-08-15 15:51:15 +09:00
Shelley Vohr
ed3b69ffb1
docs: update hasShadow for win and linux (#19675) 2019-08-08 15:49:43 -07:00
Erick Zhao
8a9a5d69b6 fix: normalize behavior of win.setOpacity() for invalid number values across operating systems (#19535)
* fix: define behavior for out-of-bounds setOpacity

* fix linux issue

* fix getOpacity behaviour

* wrong variable

* normalize more stuff

* docs

* test: use ifdescribe helper

* Update spec-main/api-browser-window-spec.ts

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

* fixes

* more tests!!!

* Update shell/browser/native_window_views.cc

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

* Update shell/browser/native_window_mac.mm

Co-Authored-By: Charles Kerr <ckerr@github.com>
2019-08-07 16:17:32 +09:00
Shelley Vohr
da2401ff39
spec: fix dirtyChai spec failures (#19652) 2019-08-06 10:27:33 -07:00
Samuel Attard
cfd230d7f1
docs: remove implicit 'any' and 'Object' types from the docs (#19585)
* docs: remove implicit 'any' and 'Object' types from the docs

* docs: more docs improvements, remove all remaining empty interfaces

* chore: update tests for better types
2019-08-05 10:45:58 -07:00
Electron Bot
e959137a4b chore: bump chromium to 32e0bab929213da1019992bf31d29 (master) (#19488) 2019-08-02 16:56:46 -07:00
Shelley Vohr
6c9d40ec33
feat: emit always-on-top-changed on macOS (#19462)
* feat: emit always-on-top-changed on macOS

* update event emission test for macos
2019-07-26 22:25:51 -07:00
Shelley Vohr
504407c5df
fix: correctly emit BrowserWindow alwaysOnTop status in change event (#19463)
* fix: correctly emit alwaysOnTop in change event

* add a test for emitted alwaysOnTop value
2019-07-26 15:53:31 -07:00
Jeremy Apthorp
2a5d40617a test: move the last of the browser window specs (#19295)
* move devtools extensions tests

* move executeJavaScript tests

* move previewFile test

* move contextIsolation tests

* move OSR tests

* RIP api-browser-window-spec.js

          .--. .-,       .-..-.__
        .'(`.-` \_.-'-./`  |\_( "\__
     __.>\ ';  _;---,._|   / __/`'--)
    /.--.  : |/' _.--.<|  /  | |
_..-'    `\     /' /`  /_/ _/_/
 >_.-``-. `Y  /' _;---.`|/))))
'` .-''. \|:  .'   __, .-'"`
 .'--._ `-:  \/:  /'  '.\             _|_
     /.'`\ :;   /'      `-           `-|-`
    -`    |     |                      |
          :.; : |                  .-'~^~`-.
          |:    |                .' _     _ `.
          |:.   |                | |_) | |_) |
          :. :  |                | | \ | |   |
          : ;   |                |           |
          : ;   |                | Here lies |
          : ;   |                |   1000    |
          : ;   |                |   flaky   |
          : ;   |                |   tests   |
        .jgs. : ;                |           |
-."-/\\\/:::.    `\."-._'."-"_\\-|           |///."-
" -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-".

* remove unused ipcMain listeners

* remove debugging logs

* close windows in offscreen test

* more closeAllWindows

* remove extra logs

* refactor webContents main spec using closeAllWindows
2019-07-26 10:09:33 -04:00
Jeremy Apthorp
70857e9a5d test: move more BrowserWindow specs (#19290)
* test: move more BrowserWindow specs

* use async instead of setTimeout for cleaner code
2019-07-16 16:37:17 -07:00
Jeremy Apthorp
42f283c281 test: re-add accidentally deleted test (#19282)
this was lost due to a tragic merge incident in #19182
2019-07-16 15:45:35 -07:00