Commit Graph

109 Commits

Author SHA1 Message Date
Tobias Taschner
a3f85e9cd5 Implement wxEVT_WEBVIEW_FULLSCREEN_CHANGED in GTK 2021-02-09 22:28:29 +01:00
Tobias Taschner
f6a23a0431 Add wxEVT_WEBVIEW_FULLSCREEN_CHANGED event
The event is triggered by wxWebView when the page requests fullscreen view.

It's currently only implemented for the edge backend.
2021-02-09 22:28:29 +01:00
Tobias Taschner
1ee05c54ed CMake: Download SDK when wxUSE_WEBVIEW_EDGE=ON
Automatically download the WebView2 SDK from nuget (official repo for the SDK)
when enabling wxUSE_WEBVIEW_EDGE to simplify usage.
Copying to 3rdparty/webview2 is still supported optionally.
2021-02-08 21:29:08 +01:00
Tobias Taschner
d17e8978a6 Make wxWebView::RunScript() const 2021-02-05 22:18:31 +01:00
Tobias Taschner
788bef2cf2 Select Edge as the default backend on MSW
If enabled and available at runtime use the Edge backend.
This is probably more useful for most users.
2021-02-05 22:18:29 +01:00
Tobias Taschner
b351e7762d Move common wxWebView code to base class
Removes duplicate code in the various webview backends
2021-02-05 22:18:29 +01:00
Tobias Taschner
0d82348328 Add wxWebView::GetBackendVersionInfo()
Allows to get the WebView backend version if available
Currently implemented for IE, Edge and webkit2.
2021-02-05 22:18:28 +01:00
Tobias Taschner
489afb3336 Allow using a fixed version with wxWebViewEdge
A fixed version may be distributed with the application
and wxWebViewEdge::MSWSetBrowserExecutableDir() allows
it's usage with wxWebViewEdge.
2021-02-05 22:18:28 +01:00
Tobias Taschner
10398b8f72 macOS: Document missing wxWebView features and don't test for them 2020-12-14 13:40:32 +01:00
Tobias Taschner
4df334cec4 macOS/iOS: Use WKWebView for wxWebView Implementation
WKWebView replaces
WebView on macOS (available since 10.10, deprecated since 10.14) and
UIWebView on iOS (available since 8.0 deprecated since 10.0).
Using WKWebView ensures future compatiblity and unifies the interface
used for iOS and macOS.
2020-12-14 10:18:01 +01:00
Tobias Taschner
46d123b953 WebViewEdge: Allow edge webview2 installation during runtime
Check if edge webview runtime is available in the call to
wxWebView::IsBackendAvailable() instead of only doing it during
process initialization. This allows an application to install
the Edge WebView2 Runtime during runtime and use the edge webview
afterwards without restarting the process.
2020-11-06 09:19:17 +01:00
Tobias Taschner
038782a684 Update WebView Edge min required version to 1.0.622.22
While technically it still builds with older versions,
version 1.0.622.22 ist the first non preview release which should
make the included webview loader DLL the most compatible for the
forseable future.
2020-10-20 15:12:09 +02:00
Maarten Bent
300fe1a6f9 Add option to wxWebViewHandler to set a custom security URL
This will be used by wxWebViewIE to modify the security URL and domain when
parsing a URL.
2020-07-28 21:22:21 +02:00
Tobias Taschner
1666f58bc6 Change documentation references from OS X to macOS (#1927)
Since OS X 10.12 it has been named macOS so it makes sense
to reference it in documentation as such, even when it
sometimes refers to older versions which were called (Mac) OS X.
2020-07-04 22:08:24 +02:00
Vadim Zeitlin
d7f19ee610 Fix spelling in comments and documentation using codespell
Apply the utility from https://github.com/codespell-project/codespell/
to fix spelling issues in the headers under both include and interface
directories and add a file with a couple of exceptions.

The exact command line used was:

    $ codespell -w -I misc/scripts/codespell.ignore -i 3 in*
2020-06-27 22:56:22 +02:00
Hertatijanto Hartono
895424ecc0 Add wxWebView::SetZoomFactor(float) and GetZoomFactor()
The new method allows to set the zoom level more precisely than the
existing SetZoom(wxWebViewZoom).

Also improve the webview sample by using radio menu items instead of
check items and manually resetting them.

Closes https://github.com/wxWidgets/wxWidgets/pull/1894

Closes #18769.
2020-06-18 03:13:00 +02:00
Tobias Taschner
7d1c40ecf5 Updated wxWebViewEdge for SDK to 0.9.488
Requires Edge 84.0.488.0 or newer

Another SDK release before 1.0 includes some
breaking changes regarding naming
2020-04-20 23:00:10 +02:00
Tobias Taschner
613687ecb5 Updated wxWebViewEdge for SDK 0.9.430
This first beta release of the WebView2 SDK has many identifiers
renamed and webview interfaces split to Host and WebView.

Closes https://github.com/wxWidgets/wxWidgets/pull/1743
2020-02-29 15:40:45 +01:00
Vadim Zeitlin
0b2dd516c1 Slightly improve Edge webview backend setup instructions
Make it even more clear where should the files go and which files should
be copied, to avoid any ambiguity.
2020-01-22 03:36:38 +01:00
Tobias Taschner
fb0e82e9d1 Implement GetPageSource() and GetPageText() 2020-01-17 21:09:51 +01:00
Tobias Taschner
bb508dc347 Implement text selection in wxWebViewEdge
Text selection/copy/paste etc implemented via javascript
2020-01-16 20:50:26 +01:00
Tobias Taschner
d829e5e832 Document unsupported parameters 2020-01-16 10:37:31 +01:00
Tobias Taschner
9f11abd8fc Rename wxWebView::EnableDevTools() to EnableAccessToDevTools() 2020-01-16 09:38:35 +01:00
Tobias Taschner
b4764bbf4f Fix typo in interface/wx/webview.h
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-15 22:14:23 +01:00
Tobias Taschner
903279a9af Add a note about WebView2 SDK license requirements 2020-01-15 17:05:34 +01:00
Tobias Taschner
bce0e65a80 Rename wxWebView::IsDevToolsEnabled() to IsAccessToDevToolsEnabled() 2020-01-15 16:22:43 +01:00
Tobias Taschner
c3f0b7a6cb Apply suggestions from code review
Co-Authored-By: VZ <vz-github@zeitlins.org>
2020-01-15 15:55:49 +01:00
Tobias Taschner
049d253a85 Fix typo and wording in webview documentation 2020-01-14 09:55:30 +01:00
Tobias Taschner
19b85d6370 Update interface/wx/webview.h
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-12 21:10:41 +01:00
Tobias Taschner
68c46681a0 Document wxWebViewEdge build process 2020-01-11 15:43:22 +01:00
Tobias Taschner
d72e5874eb Add wxWebView methods to enable dev tools
Currently only implemented for the Edge (Chromium) backend.
2020-01-10 22:27:36 +01:00
Markus Pingel
6a99e7e273 Add wxWebView Edge (Chromium) implementation
This backend requires WebView2 SDK and enables usage of Edge (Chromium)
on Windows 7 and newer
2020-01-10 22:22:28 +01:00
Tobias Taschner
095a93e0c0 Add wxWebView::IsBackendAvailable()
This allows to check if a specified backend has been registered before creation of a new instance
2020-01-09 13:44:06 +01:00
Maarten Bent
9455fe2d21 Move wxWebViewIE specific functions to correct interface class 2019-11-14 00:04:48 +01:00
Robin Dunn
8b489f53d6 MSWSetEmulationLevel and MSWSetModernEmulationLevel are static 2019-06-10 21:03:40 -07:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Takeshi Abe
f10939862a Fix a typo in WebView::RunScript's comment
innderHTML -> innerHTML
2019-01-21 16:11:11 +09:00
Chilau He
3aa6aec620 Add wxWebViewIE::MSWSetEmulationLevel()
This extends and replaces MSWSetModernEmulationLevel() by allowing a
more fine-grained choice of the emulation level used by wxWebViewIE.

Closes https://github.com/wxWidgets/wxWidgets/pull/1133
2019-01-14 23:25:14 +01:00
Steven Lamerton
b61123cd7d Allow distinguishing user- from script-opened wxWebView windows
Add wxWebViewEvent::GetNavigationAction() returning a value that can be
either wxWEBVIEW_NAV_ACTION_USER for the links opened by the user, or
wxWEBVIEW_NAV_ACTION_OTHER for the other ones (e.g. opened from
JavaScript code on the page).

Closes #15402.
2018-08-19 22:27:34 +02:00
Vadim Zeitlin
b82af43361 Improve RunScript() and MSWSetModernEmulationLevel() documentation
Try to explain things better and add a couple of examples.
2017-10-22 23:38:08 +02:00
Vadim Zeitlin
ee9615b9ac Consistently capitalize "JavaScript"
This is the proper name of the language, not "Javascript".
2017-10-22 00:26:33 +02:00
Jose Lorenzo
af8f7f33c3 Merge wxWebView JavaScript improvements branch
This is a squashed commit of the SOC2017_WEBVIEW_JS branch from
https://github.com/joseeloren/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/538
2017-10-21 22:42:30 +02:00
Steven Lamerton
00ddcfa18a Add WebKit2 description to docs 2017-04-23 08:39:33 +01:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Dimitri Schoolwerth
31145b8e3a Fix some typos, no code changes (besides strings) 2015-06-05 02:54:46 +04:00
Paul Cornett
2014950b1c spelling fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-26 18:51:16 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Steve Lamerton
70f92ede85 Fix wxWebView documentation warnings.
See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-21 10:30:22 +00:00
Steve Lamerton
276c32e15b Correctly link to wxWebViewNavigationError from wxWebViewEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 14:38:39 +00:00
Steve Lamerton
178a73f313 Document the unused baseURL parameter in wxWebViewIE.
See #15223.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 14:04:56 +00:00