Commit graph

50 commits

Author SHA1 Message Date
Cheng Zhao
459a2304b4 fix: emit focus/blur events for webview (#14344)
* fix: emit focus/blur events for webview

* test: webview can emit focus event
2018-08-28 13:35:44 -05:00
Cheng Zhao
6736d4ef29
fix: do not bubble up resize event from webview (#14271) 2018-08-23 15:42:35 +09:00
Cheng Zhao
cd8bb1d3b4
chore: print error when removed webview attribute is used (#14230)
* chore: print error when removed webview attribute is used

* docs: document removed webview features
2018-08-23 10:45:43 +09:00
Cheng Zhao
dd5b8769be fix: use OOPIF for webview tag (#13869)
* 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-16 15:57:40 -07:00
Cheng Zhao
305e3aad40
refactor: remove private webContents.getId() API (#13674) 2018-07-23 18:08:36 +09:00
Cheng Zhao
9d6f1a372e
fix: create WebContents for webview on request (#13713) 2018-07-21 11:11:28 +09:00
Cheng Zhao
e2029435c4 fix: use context counter as contextId
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:00:10 -07:00
Felix Rieseberg
deedf6c3f4 feat: Add isCurrentlyAudible() to WebContents (#13614)
* 🔧 Add isCurrentlyAudible() to WebContents

* ❤️ Implement feedback, use await to wait for event

* 👷 Add missing imports
2018-07-12 21:35:11 +10:00
Cheng Zhao
4cdb1b8fc3 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 10:44:26 +09:00
Shelley Vohr
211b542ae4
remove setZoomLevelLimits 2018-02-20 08:57:48 -05:00
Shelley Vohr
b74304145e
createShadowRoot => attachShadow 2018-01-31 19:29:23 -05:00
Kevin Sawicki
1d84d83fd4 Forward webview visibility change events from browser process 2017-02-28 08:23:00 -08:00
Kevin Sawicki
7564a9973b Use const instead of var 2017-02-28 08:23:00 -08:00
Kevin Sawicki
f4717b34e9 Register visibility change listener when attached 2017-02-28 08:23:00 -08:00
deepak1556
403e7681c1 add basic webview zoom specs 2017-02-18 01:34:32 +05:30
deepak1556
e3fe3cc490 map webframe zoom api to use HostZoomMap 2017-02-12 00:49:17 +05:30
deepak1556
63c0e4cbb1 Add ZoomController to manager zoom changes for webcontents 2017-02-12 00:49:17 +05:30
Kevin Sawicki
9a5df9da41 Expose setVisualZoomLevelLimits on webContents and <web-view> 2016-11-22 08:07:55 -08:00
Paul Betts
e2649ce7d8 Add new method to set layout-based zoom level limit 2016-11-21 14:59:55 -05:00
Birunthan Mohanathas
2986b7bc4a Allow webview guests to be resized manually
This adds the `disableguestresize` property for webviews to prevent the
webview guest from reacting to size changes of the webview element. This
also partially documents the `webContents.setSize` function in order to
manually control the webview guest size.

These two features can be combined to improve resize performance for
e.g. webviews that span the entire window. This greatly reduces the lag
described in #6905.
2016-11-15 11:00:09 -08:00
Kevin Sawicki
6fda4fc45c Guard against attachedCallback firing while handling detachedCallback 2016-11-07 13:42:36 -08:00
Kevin Sawicki
0485069c7b Use spread operator 2016-11-07 08:25:01 -08:00
Kevin Sawicki
89a26684e5 Return webContents directly 2016-11-07 08:25:01 -08:00
Kevin Sawicki
0e1c2b0fcb Use for/of and remove loop variables 2016-11-07 08:25:01 -08:00
Kevin Sawicki
6eab14359c Use ES6 style class for WebViewImpl 2016-11-07 08:25:01 -08:00
Kevin Sawicki
76f96bd99c Destructure requires 2016-11-07 08:25:01 -08:00
Kevin Sawicki
48bcad87c2 Use template strings 2016-11-07 08:25:01 -08:00
Kevin Sawicki
712b15286c Use let/const instead of var 2016-11-07 08:25:01 -08:00
Kevin Sawicki
3053be345b Remove unneeded returns 2016-11-07 08:25:01 -08:00
Zeke Sikelianos
56d62ff589 add html doctype 2016-09-22 14:47:20 -07:00
Zeke Sikelianos
62375663ab add type to webview style tag 2016-09-22 14:34:03 -07:00
Dave Townsend
313b2faa3c Add a guestinstance attribute to webviews reflecting their current guest
instance ID and allowing moving a guest instance to a new webview.
2016-09-09 10:32:05 -07:00
Kevin Sawicki
f7b72f0948 Move capturePage to WebContents 2016-07-06 09:21:28 -07:00
gellert
3d010a8988 fixes transformed webview size 2016-06-19 00:41:42 +02:00
Kevin Sawicki
4f0a52628e Add showDefinitionForSelection to webContents/webview 2016-06-08 10:15:36 -07:00
Kevin Sawicki
583bb49f6c Get hidden state by using parent window directly 2016-05-25 10:13:12 -07:00
Kevin Sawicki
73b07f76a3 Support document visiblity state and events in webviews 2016-05-25 09:12:52 -07:00
Kevin Sawicki
4754e4aabb Add zoomFactor to guest params 2016-05-19 14:32:16 -07:00
Kevin Sawicki
fef2f789cd 🎨 2016-05-19 14:30:53 -07:00
Kevin Sawicki
dae68be2ce Remove deprecated APIs 2016-05-06 10:12:53 -07:00
Rob Brackett
64a84dee3b Add isLoadingMainFrame method to WebContents.
Also switch `webContents.executeJavaScript` to check it instead of `isLoading`.
There doesn’t seem to be a reasonable public way to get this information out of Chromium, so it’s synthesized here based on WebContentsObserver callbacks.
Fixes #5183.
2016-04-18 10:37:08 -07:00
Kevin Sawicki
8d8d5878a3 Rename ATOM_ ipc event prefix to ELECTRON_ 2016-04-07 09:04:55 -07:00
Zeke Sikelianos
7c58f7fb02 eradicate all per-file eslint globals 2016-03-30 17:00:34 -07:00
Zeke Sikelianos
e6698102c9 standardize by hand 2016-03-30 17:00:33 -07:00
Zeke Sikelianos
cfdfdc8ccc standardize by hand 2016-03-30 17:00:33 -07:00
Zeke Sikelianos
3855a774ab autoformat more easy files 2016-03-30 17:00:31 -07:00
Kevin Sawicki
8889c29866 Use rest parameters 2016-03-18 11:51:02 -07:00
Kevin Sawicki
28e9d87d86 Add back return in getter 2016-03-11 11:25:56 -08:00
Kevin Sawicki
a3f08c9b51 Use arrow functions to replace old CoffeeScript => this wrappers 2016-03-11 11:25:56 -08:00
Kevin Sawicki
70aa9b06ee Move JavaScript to root lib/ folder 2016-03-08 11:14:21 -08:00
Renamed from atom/renderer/lib/web-view/web-view.js (Browse further)