Commit graph

1208 commits

Author SHA1 Message Date
Robo
4abf55801f fix: switch to mojo proxy resolver (3-1-x) (#15813) 2018-11-26 15:38:33 -08:00
Cheng Zhao
5c853b681c
Fix missing remote object error when calling remote function created in preload script (3-0-x) (#15445)
* fix: report wrong context error based on contextId

* fix: destroyed remote renderer warning is now async
2018-11-01 08:55:02 +09:00
trop[bot]
41e86efda0 fix: folder open not working in devtools (#15396) 2018-10-25 10:01:29 -07:00
Shelley Vohr
02cd96875d
fix: ability to fetch separators by id (#15299) 2018-10-19 21:58:07 -07:00
trop[bot]
ead294fe13 fix: trim app name and productName (#15286)
Fixes #15245
2018-10-19 09:13:10 -07:00
trop[bot]
906436f31b fix: loading of devtools extensions on startup (backport: 3-0-x) (#15264)
* Fix loading of devtools extensions on startup

The persisted DevTools Extensions were not being loaded correctly at startup. The `addDevToolsExtension` function was not defined when it was being called. An error was being thrown and ignored, so the whole thing would fail silently. I moved the code to load the extensions to the end of the event handler, so now it works.

* fixup: remove trailing spaces to unblock CI

* fixup: add logging when the Electron Enable Logging env var is set

* Fix linter error on undefined srcDirectory

* fixup: catch exception when loading extension

* Revert "fixup: catch exception when loading extension"

This reverts commit 42c2cf95bcaab8abfc5fbecbe4365d3adfe36d5b.
2018-10-18 19:13:01 -07:00
trop[bot]
12f75832b8 add width to webview iframe (#15204) 2018-10-17 11:54:43 +09:00
Cheng Zhao
8716f718a9 fix: print warning after DOM is created 2018-10-17 10:42:02 +09:00
Cheng Zhao
714f3ffd29 chore: warn memory leak when using nativeWindowOpen with nodeIntegration 2018-10-16 20:12:53 +09:00
trop[bot]
760def6147 fix: Memory > Profiles > Load in DevTools (#15155) 2018-10-14 10:59:04 -07:00
trop[bot]
73935bc5dd fix: support ASAR in fs.copyFile (#14953) 2018-10-04 09:23:19 +10:00
Samuel Attard
db0384116e fix: actually return appmetrics (#14750)
Fixes #14710
2018-09-21 10:10:37 -05:00
Shelley Vohr
89148bcf8d
refactor: deprecation handling apis (#14615) 2018-09-13 21:39:00 -07:00
Robo
8d27657fa5 fix: use render client id to track deleted render process hosts (backport: 3-0-x) (#14557)
* fix: use render client id to track deleted render process hosts

* fix: use webContentsId with contextId together (#13749)
2018-09-11 19:56:20 -07:00
Cheng Zhao
d3d44bdbc6 fix: manually manage WebContents of webview when it is detached 2018-09-07 15:42:58 +09:00
trop[bot]
03ef5c25f7 fix: don't use deprecated fstatNoException API (#14484) 2018-09-06 13:09:03 -07:00
trop[bot]
89a6f1efbb feat: add getUploadProgress API to the net API (#14446) 2018-09-04 12:26:50 -05:00
trop[bot]
d365078022 fix: webview.focus() should move page focus to webview (#14428) 2018-09-03 13:26:41 +10:00
trop[bot]
2e479ff799 fix: use flexbox to style webview (backport: 3-0-x) (#14408)
* fix: use flexbox to style webview

* docs: remove notes on browserplugin based webview
2018-08-31 14:48:08 -07:00
trop[bot]
ccf8a797dc fix: use OS process handle to clear object registry (#14364)
RenderProcessHost switch can happen between ipc calls when
speculative process are invvolved, which will lead to deletion
of entries on current context. Use OS process handles to
uniquely associate a destruction handler for a render process.
2018-08-28 22:55:42 -07:00
Milan Burda
3301e05f33 fix: don't expose desktopCapturer in sandboxed renderers if the feature is disabled (#14345) 2018-08-28 19:51:07 -05:00
trop[bot]
b1c22ba531 fix: emit focus/blur events for webview (backport: 3-0-x) (#14359)
* fix: emit focus/blur events for webview

* test: webview can emit focus event
2018-08-28 13:38:11 -05:00
trop[bot]
ff539c1d61 fix: don't expose view APIs when not enabled (#14321) 2018-08-27 13:00:19 +09:00
trop[bot]
ba703deee2 Print error when removed webview attribute is used (backport: 3-0-x) (#14274)
* chore: print error when removed webview attribute is used

* docs: document removed webview features
2018-08-23 15:42:08 +09:00
Samuel Attard
ef0a6d9a1c fix: inheritance of webPreferences sub properties 2018-08-22 12:19:11 -05:00
Cheng Zhao
44b0245ac4 fix: use OOPIF for webview tag (#13869) (#14156)
* fix: use OOIF for webview tag

* fix: do not call GetNativeView for webview

* fix: OOIPF webview's WebContents is managed by embedder frame

* fix: guest view can not be focused

* fix: clear zoom controller when guest is destroyed

* fix: implement the webview resize event

The webview is no longer a browser plugin with the resize event, use
ResizeObserver instead.

* test: disable failed tests due to OOPIF webview

* fix: embedder can be destroyed earlier than guest

This happens when embedder is manually destroyed.

* fix: don't double attach

* fix: recreate iframe when webview is reattached

* fix: resize event may happen very early

* test: some tests are working after OOPIF webview

* chore: remove unused browser plugin webview code

* fix: get embedder via closure

When the "destroyed" event is emitted, the entry in guestInstances would be
cleared.

* chore: rename browserPluginNode to internalElement

* test: make the visibilityState test more robust

* chore: guestinstance can not work with OOPIF webview

* fix: element could be detached before got response from browser
2018-08-17 08:21:36 -07:00
trop[bot]
2642e064a2 fix: add a hidden option to disable remote dereferencing (#14113) 2018-08-15 08:44:23 -07:00
trop[bot]
daf23288bc fix: override fs.realpathSync.native and fs.realpath.native (backport: 3-0-x) (#14051)
* fix: override fs.realpathSync.native and fs.realpath.native

* spec: test new native functions
2018-08-13 23:53:34 -07:00
trop[bot]
69caea38c1 fix: make asarStatsToFsStats nherit from fs.stats (#14041) 2018-08-12 21:13:38 -07:00
Milan Burda
b5bfd9867b Don't pass preloadPath via ELECTRON_BROWSER_SANDBOX_LOAD for security reasons (#13031) (#14026) 2018-08-11 12:53:33 -05:00
trop[bot]
5aa247a627 feat: add location url to "Node.js Integration with Remote Content" warning (backport: 3-0-x) (#13976)
* docs: fix typo

* feat: add location url to Node+Remote warning
2018-08-09 20:48:36 -05:00
Milan Burda
98033e4f45 Fix process.execPath returning parent process path instead of the helper in sandboxed renderer (#13959) 2018-08-09 09:58:44 -05:00
trop[bot]
3d89185396 fix: ipcRemote.sendSync regression after moving away from JSON for return values (#13997) 2018-08-09 09:24:10 -05:00
trop[bot]
9818378e2d fix: some APIs modified for ASAR support cannot be util.promisify'ed (#13902) 2018-08-01 16:38:50 +10:00
trop[bot]
a62cb1e84c fix: util.promisify(setTimeout) (#13860) 2018-07-30 15:02:52 +10:00
trop[bot]
4333020157 fix: create WebContents for webview on request (#13761) 2018-07-21 16:51:31 +09:00
Cheng Zhao
04b7c77951 fix: use webContentsId with contextId together
After after using `processId-contextCounter` as contextId, it may happen
that contexts in different WebContents sharing the same renderer process
get the same contextId. Using webContentsId as part of key in
ObjectsRegistry can fix this.
2018-07-20 10:53:02 +09:00
Cheng Zhao
136cf389e8 fix: use context counter as contextId (backport 3-0-x)
For sandboxed renderer it may not have a node::Environment in the context,
using a increasing counter as contextId works for all cases.
2018-07-19 11:27:41 -07:00
John Kleinschmidt
8f8d198c5a
Merge pull request #13539 from trop-bot/3-0-x-bp-enable-webview-in-sandbox-renderer-1530547750986
Backport (3-0-x) - Enable webview in sandbox renderer
2018-07-17 10:01:40 -04:00
trop[bot]
b49b071a1f fix: remove race condition for executeJavaScript (#13692)
Replaces 'did-finish-load' with 'did-stop-loading' which semantically
maps to the events inside Chromium.  Before I think we were relying
on a natural 99% winnable race condition.

Fixes #13504
2018-07-16 21:22:27 -07:00
Cheng Zhao
adf49daaac fix double-freeing remote references
After the page does navigations, garbage collection can still happen in
the old context. This commit changes to store references to remote objects
by _pages_, instead of by _WebContents_.
2018-07-12 11:17:26 +09:00
Hari Juturu
f63e5ffa65 cache lastwebprefs 2018-07-02 16:09:17 +00:00
Hari Juturu
32e40cb4c3 Enable webview in sandbox renderer Security: Inherit embedder prefs onto webview 2018-07-02 16:09:17 +00:00
trop[bot]
93edf2edd3 Backport (3-0-x) - fix: deprecate properties in app.getAppMetrics() (#13453)
* fix: deprecate properties in app.getAppMetrics()

* address feedback from review

* fix deprecated property location

* simplify test
2018-06-27 19:07:39 +10:00
Jack Teng
10df019075 fix: can't load module error when app is packaged
due to change in node.js(https://github.com/nodejs/node/issues/17076)
internalModuleReadFile has been renamed to internalModuleReadJSON, and
in vendor/node/lib/internal/modules/cjs/loader.js it will call
internalModuleReadJSON and result in can't read the package.json file.
2018-06-19 10:42:21 -07:00
deepak1556
7b47d69efe Remove did-get-response-details and did-get-redirect-request events
https://chromium-review.googlesource.com/c/chromium/src/+/805008
https://chromium-review.googlesource.com/c/chromium/src/+/786320
2018-06-19 11:49:41 +10:00
Zhuo Lu
ab24a1e36d feat: netLog API for dynamic logging control (#13068)
* Introduce `net.{start|stop}Logging()`

- Slight regression right now as Electron won't automatically start logging net-logs at launch, will soon be fixed
- To implement callback for async controls

* Add `net.isLogging` & optional callback param for `net.stopLogging()`

* Fix small regression on --log-net-log

--log-net-log should work again

* Error on empty file path

* Only start with valid file path

* Remove unused var

* Allow setting log file path before URLRequestContextGetter starts logging

* Add net log tests

* Remove redundant checks

* Use brightray::NetLog

* Clean up code

* Should automatically stop listening

* 🎨 Attempt to fix styles

* Only run non-null callback

* Dump file to tmpdir

* Simplify net log spec

Spawned Electron process on Linux CI can fail to launch

* Separate netLog module

* Remove net logging test from net spec

* Add tests for netLog

* Fix header guard

* Clean up code

* Add netLog.currentlyLoggingPath

* Callback with filepath

* Add test for case when only .stopLogging() is called

* Add docs

* Reintroduce error on invalid arg

* Update copyright

* Update error message

* Juggle file path string types
2018-06-19 11:45:58 +10:00
Cheng Zhao
70e17b5f8f feat: add LabelButton API 2018-06-18 16:51:36 +09:00
Cheng Zhao
c8e8cb86ce feat: add Button API 2018-06-18 16:51:36 +09:00
Cheng Zhao
ba3700141f feat: add TextField API 2018-06-18 16:51:36 +09:00