Commit graph

1114 commits

Author SHA1 Message Date
Samuel Attard
7cc3b877dc Fix event leak on reuse of touchbar item (#12527)
* fix event leak on reuse of touchbar item

* Clean up child touch bar item event listeners and escape item listeners
2018-04-15 10:24:47 -05:00
Jeremy Apthorp
97fb15ac49 Enable WebFrame method forwarding in sandboxed renderers (#12538)
* Enable WebFrame method forwarding in sandboxed renderers

Fixes #9073

* Non-change to kick CI
2018-04-12 11:57:40 +10:00
Andrew MacDonald
6bfb122cd1 Add a display_id parameter to the desktopCapturer API. (#12417)
* Add a screen_api_id parameter to the desktopCapturer API.

When using the DirectX capturer on Windows, there was previously no way
to associate desktopCapturer/getUserMedia and electron.screen API
screens. This new parameter provides the association.

* Fix non-Windows build.

* Fix Mac.

* Fix Mac harder.

* JS lint

* clang-format C++ code.

* IWYU

* display_id, Linux comment, better test

* lint

* Fix tests on Linux.

* Add display_id documentation.
2018-04-09 14:43:35 +09:00
Robo
89f2eb1023 asar: remove patch to support graceful-fs (#12562) 2018-04-07 10:13:32 -05:00
Nitish Sakhawalkar
970f79e32f Check for devtools in BrowserWindow.getFocusedWindow() (#12526) 2018-04-06 09:21:32 -04:00
Jeremy Apthorp
f0d08f4da1 Propagate referrer to new windows (#12397)
* Propagate referrer to new windows

Fixes #9205

* Rearrange -new-window event arguments for backwards-compatibility

* Plumb referrer policy through guest-window-manager

* Document the Referrer structure and its uses

* Add tests for referrer in new windows

* Docs nits
2018-04-05 18:13:24 -05:00
Charles Kerr
1a649a6ac3
Handle in-app-purchase less fatally on non-Darwin (#12511)
Fixes #12311

Right now it throws a new error when the file is even require()d, but this isn't ideal as there are cases where everything is mass-required, such as Spectron. Instead, we should throw an error on non-Darwin environments only when the IAP methods are invoked.
2018-04-02 18:55:44 -05:00
Shelley Vohr
a677c22e1f
re-enable null check against menu item accelerators (#12449) 2018-03-27 20:32:55 -04:00
Nitish Sakhawalkar
9d1527b1df Fix context menu for sandbox devtools (#11933) 2018-03-22 16:15:57 +09:00
Samuel Attard
0ac883c6d4
Remove the race condition between new process creation and context release (#12342)
* Remove the race condition between new process creation and old process releasing remote context

Previously there was a race condition where the getId() method would return the new context ID even
though the release was for the old context.  This changes it to send the "initial" context ID with
the release message to ensure there is no race.

* fetch context ID from remote in sandbox mode
2018-03-20 15:54:47 +11:00
Shelley Vohr
31d688ad3d
Check menu.popup options are an object (#12325)
* check menu.popup options are an object

* Add a spec for menu.popup options check

* remove stray .only
2018-03-17 06:31:10 +09:00
Felix Rieseberg
243ab45111 🔧 Fix security warning (#12309) 2018-03-16 06:21:38 +09:00
Samuel Attard
4b476f13bb Revert "Fixes electron/electron#12147" (#12293)
* Revert "Set appropriate defaults for webview options (#12271)"

This reverts commit c2673aa970.

* Revert "Fixes electron/electron#12147 (#12193)"

This reverts commit f54c94d6c9.
2018-03-15 16:18:36 +09:00
Charles Kerr
c2673aa970 Set appropriate defaults for webview options (#12271)
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values

* Test inherited default propogation

* Refactor to remove coupling from fetching values and defaults

* Test description type

* Fix up tests
2018-03-15 13:56:46 +09:00
nous-
f54c94d6c9 Fixes electron/electron#12147 (#12193) 2018-03-15 13:29:32 +09:00
Shelley Vohr
9aeb61181a Fix require on network share path (#12282)
* first pass at server/network require fix

* refactor for clarity
2018-03-15 11:45:13 +09:00
Hari Juturu
704af29543 Exposing process.env status (#12166) 2018-03-14 12:01:40 +09:00
Felix Rieseberg
582ef30b4a 👷 Tests, how do they work 2018-03-13 17:35:55 -07:00
Felix Rieseberg
72579f9bab 🔧 Sort crashes 2018-03-13 13:57:12 -07:00
Samuel Attard
8e07e7483f
Merge pull request #12228 from electron/fix-window-open-not-showing
Parent's visibility trumps inherited 'show' option
2018-03-13 17:41:00 +09:00
Charles Kerr
e400585a0e Apply further ES6 bikeshedding 2018-03-13 17:09:47 +09:00
Charles Kerr
2d90e763ad Use idiomatic ES6 when merging options 2018-03-13 16:23:39 +09:00
Charles Kerr
379bd79de4 Remove unnecessary work when merging options 2018-03-13 16:18:50 +09:00
Felix Rieseberg
71795ecc62 fix: Incorrect warnings in webviews (#12234)
* 🔧 Get correct webContents

* 🔧 Err, webPreferences
2018-03-13 10:55:32 +09:00
Charles Kerr
685948bcaa Parent's visibility trumps inherited 'show' option 2018-03-13 00:28:34 +09:00
Samuel Attard
795447f61a Implement dialog (alert/confirm) blocking as a user switch after the first dialog
* This is to enable more browser-like behavior so that users who run third-party code
  will not be DOS'ed with alerts and confirms.  This is already handled like this
  in most major browsers so this will greatly help these developers
2018-03-06 11:19:15 +09:00
Shelley Vohr
199cf31b9e
deprecate screen.getMenuBarHeight 2018-03-05 19:45:51 -05:00
Cheng Zhao
35cbe9d140 Fix dockMenu not being referenced in JavaScript (#12062)
* Fix dockMenu not being referenced in JavaScript

* spec: Test garbage collecting dock menu
2018-02-26 22:15:06 -08:00
shelley vohr
18362eb948 improve Menu and MenuItem testing (#12015)
* split menu/menuitem and add some tests

* fix ipc send issue

* feedback: make tests less brittle

* clean up MenuItem accelerator and label tests
2018-02-23 07:53:59 -06:00
John Kleinschmidt
2a97e48465
Merge pull request #11968 from electron/refactor-menu-popup
Refactor menu.popup
2018-02-21 14:29:52 -05:00
shelley vohr
0ef8f1bdad Add deprecation warnings fot html/rtf methods (#11995) 2018-02-21 06:53:48 -06:00
shelley vohr
772a69e24a deprecate autoSubmit in favor of uploadToServer (#11992) 2018-02-20 22:31:48 -06:00
shelley vohr
193febd18c deprecate boolean highlightMode param (#11993)
* deprecate boolean highlightMode param

* add process.noDeprecations check

* fix native method override

* add todo
2018-02-20 22:30:32 -06:00
shelley vohr
719e5a93b4 deprecation for webContents.openDevTools (#11986)
* deprecate old openDevTools param

* add deprecation check and existence check

* fix method issues
2018-02-20 22:30:02 -06:00
Charles Kerr
f59d078eea Use more idiomatic JS in WebContents' init() 2018-02-20 19:20:11 -06:00
Charles Kerr
9c56b81b71 Throw an error if menu.popup() has no window 2018-02-20 18:38:05 -06:00
Charles Kerr
5a25b88b50 Fix browserWindow detection in menu.popup() 2018-02-20 18:35:39 -06:00
Charles Kerr
708f39a1a5 update a few menu.popup() calls to use the new API 2018-02-20 14:02:24 -06:00
Shelley Vohr
5065e159f1
positionItem => positioningItem 2018-02-20 11:28:34 -05:00
Cheng Zhao
dc62e51ba4 Fix the cyclic reference in menu delegate (#11967)
* Fix the cyclic reference in menu delegate

* Fix menu tests due to delegate change
2018-02-20 10:11:35 -06:00
Shelley Vohr
fb7fb4972d
options all the things 2018-02-20 11:10:53 -05:00
shelley vohr
e1b81b8a62 remove support for crashReporter autoSubmit (#11976) 2018-02-20 10:10:35 -06:00
shelley vohr
8d4bf3e29a
Merge pull request #11974 from electron/remove-setZoomLevelLimits
remove setZoomLevelLimits
2018-02-20 10:51:41 -05:00
Shelley Vohr
211b542ae4
remove setZoomLevelLimits 2018-02-20 08:57:48 -05:00
Shelley Vohr
1a3661206e
remove unused deprecate module from crashreporter 2018-02-20 08:31:38 -05:00
Shelley Vohr
fc025064f7
remove setExtraParameter for 2.0 2018-02-20 08:26:10 -05:00
Shelley Vohr
56f06187d5
forgot to remove old method 2018-02-19 21:03:10 -05:00
Shelley Vohr
6e11a3e53d
add restructured window.popup 2018-02-19 20:59:27 -05:00
Shelley Vohr
cd9e7142e4
add conditional for menu.popup(window, callback) 2018-02-19 13:06:37 -05:00
Samuel Attard
a20b379f26 fix windows tests 2018-02-16 16:02:10 +11:00