Commit Graph

6179 Commits

Author SHA1 Message Date
amaitland bf41aa2d75 Core - ResourceHandler.Read only read as many bytes as can be written to DataOut
Previously we'd read too many bytes and attempting to write them to dataOUt would cause a see System.NotSupportedException

Resolves #3038
2020-02-05 07:12:08 +10:00
amaitland 82836e0aee WinForms - Update xml doc Dock = DockStyle.Fill is the default
Make it clear we are setting the default to DockStyle.Fill, this may not be expected
by some. It has been that way for 5+ years, so changing the default would be difficult
and unexpected, instead we make it clearer this is the case.

Resolves #3019
2020-02-01 20:48:30 +10:00
amaitland d82caeaceb WinForms - override Control.DefaultSize return 200x100
When ChromiumWebBrowser is hosted in a FlowLayoutPanel the Dock = DockStyle.Fill
ends up with a browser having no width/height depending on the option layout.

As Control.DefaultSize returns Size.Empty, looking at WebBrowserBase it defaults to Size(75, 23)
which seems way too small to be meaningful. We'll default to 200x100 for now.

https://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/Control.cs,17f6db7866977c1a

Related to issue #3019
2020-02-01 20:43:40 +10:00
amaitland 0c6290e709 WPF - InternalDispose add browser null check
It's possible to Dispose the browser before OnAfterBrowserCreated is called
resulting in a NRE when attempting to set WasHidden(true).

Resolves #3037
2020-02-01 20:33:08 +10:00
amaitland f8900fdf62 PackageReference - Tabs to spaces 2020-02-01 14:55:18 +10:00
amaitland 8706aadd3f CefSettings - Update GPU Disabled comments regarding WebGl
Swiftshader will be used for CPU based software rendering
2020-02-01 12:17:58 +10:00
amaitland de485a678d nuget - Update nupkg tags 2020-02-01 11:05:05 +10:00
amaitland 94ae6bea17 Upgrade to CEF 79.1.36+g90301bd+chromium-79.0.3945.130 / Chromium 79.0.3945.130 2020-01-31 10:59:33 +10:00
amaitland 961fc97c9d WebBrowserExtensions - Add missing semi colon 2020-01-31 08:16:34 +10:00
amaitland 499c6a80db WPF - ChromiumWebBrowser.GetBrowser() Throws InvalidOperationException if called on Non UI Thread.
- Extract error message out into a internal const so it's not duplicated
- Manually check InternalIsBrowserInitialized() method instead of using the extension method

Resolves #3032
2020-01-31 07:51:25 +10:00
amaitland 788cc2ef68 PackageReference - Set minClientVersion="4.0.0"
Issue #2795
2020-01-30 20:49:30 +10:00
amaitland 7ab4a24e17 Appveyor - Push new nuget packages to myget 2020-01-30 20:41:48 +10:00
amaitland bd9e568305 Nuget - Additional PackageReference set of nupkg files
**WORK IN PROGRESS**

Unfortunately the new chromiumembeddedframework.redist.win-x86/chromiumembeddedframework.redist.win-x64 packages
aren't usable yet, the files are copied to the relevant natives folder .net core just doesn't load the dlls.
I suspect if we were to p/invoke the dll then it would be loaded correctly, might need to raise this with .Net Core team.
So for now just using the older cef.redist packages, which expose props that can be used in any other package.
the new CefSharp.Common.win packages will copy the files using the .targets file as before, difference being PlatformTarget
is used instead of Platform so we can detect the actual platform of the project not the solution.

AnyCPU is not currently supported, x86/x64 only, Win32 might work, not tested though.
Not clear that AnyCpu will be possible, more digging to do on that front.

Issue #2795
2020-01-30 20:24:59 +10:00
amaitland eabeac3cba Update README.md and bug_report.md
- Include details on version 79.1.350 release
2020-01-29 19:29:56 +10:00
Gilberto Stankiewicz e011086883 Fix all C6246 warnings: Local declaration hides declaration of the same name in outer scope. (#3027)
* Fix all C6246 warnings: Local declaration hides declaration of the same name in outer scope.

* Removing outter scope `global`
2020-01-29 16:17:14 +10:00
amaitland 10d52419f3 xml doc improvements 2020-01-29 10:22:18 +10:00
amaitland 38c7941ab6 xml doc - remove seealso internal interface references 2020-01-29 10:22:17 +10:00
amaitland 27cae10f15 Upgrade to CEF 79.1.35+gfebbb4a+chromium-79.0.3945.130 / Chromium 79.0.3945.130 2020-01-29 05:52:55 +10:00
amaitland 798b2bb62e Sandcastle - Update version and excluded namespaces 2020-01-29 05:37:45 +10:00
amaitland 79c99878c5 Xml Doc improvements 2020-01-29 05:37:45 +10:00
amaitland 1b1cf522de Core - Update ReferrerPolicy enum values
**Breaking Change**

Resolves #3026
2020-01-29 05:36:55 +10:00
amaitland 39a305cac1 Xml Doc - Improvements and fixes
- Some classes are now excluded
- Many minor fixes should hopefully reduce the number of errors reported by Sandcastle
- Some of the xml doc is generated by Atomineer, usually in cases where CEF lacks documentation
2020-01-29 05:36:54 +10:00
amaitland ad2c1756f9 Core - Add IBrowserHost.GetNavigationEntriesAsync extension method 2020-01-24 10:51:29 +10:00
amaitland 1155ef107c Core - ResourceHandler set Stream.Position = 0 and if CanSeek
- Prior to version 75 the Stream.Position was set to 0 before the ResourceHandler would read the Stream.
This restores that behaviour.
- Minor refactor of if statement for Stream.Can seek, only override ResponseLength with Stream.Length of not already set

Resolves #2903
2020-01-23 07:56:13 +10:00
amaitland 731c626cfe Add cefsharp/79 branch details and update build numbers
- Update appveyor.yml/build.ps1 version numbers to 79.1.310
- Created release branch in README.md

Branch to follow shortly
v79.1.310-pre
2020-01-22 10:27:58 +10:00
amaitland 99fedd23ab CefSharp.Common.targets - Remove message output for PlatformCheck as they're not displayed in a fashion users will actually see them
- Tabs to spaces for consistency
2020-01-21 19:41:18 +10:00
amaitland 8559aa6e50 CefSharp.Common.targets - Update link, condense wording
Issue #3009
2020-01-21 13:38:55 +10:00
amaitland fb6990a195 CefSharp.Common.targets - Improve PlatformCheck error messaging
Only the error will be shown in the VS error pane, hopefully the additional messages are useful.

Issue #3009
2020-01-21 12:33:01 +10:00
amaitland 44113d77a4 DevTools - now shown as popup (visible in taskbar).
- Pass null for CefWindowInfo.SetAsPopup parent handle
- Add optional params to IWebBrowser/IBrowser.ShowDevTools extension methods.

Anyone wishing to use the old behaviour can do something like

var host = browser.GetBrowserHost();

var windowInfo = new WindowInfo();
windowInfo.SetAsPopup(host.GetWindowHandle(), "DevTools");

browser.ShowDevTools(windowInfo);

Resolves #2997
2020-01-21 09:06:28 +10:00
amaitland 1550251940 Upgrade to CEF 79.1.31+gfc9ef34+chromium-79.0.3945.117 / Chromium 79.0.3945.117 2020-01-21 08:56:08 +10:00
amaitland e4312760ce API Change - IJavascriptObjectRepository.Register remove isAsync default param
**BREAKING CHANGE**

- You must now explicitly specify the `isAsync` param.
- Add additional xml doc comment regarding .Net Core and using only isAsync = true

The isAsync = false option (sync binding) requires WCF which isn't available on .Net core, remove the default value so you are forced to specify an option and in the process hopefully read the documentation.

For those who previously hadn't provided a param then simply pass in false for the third argument.
e.g.
browser.JavascriptObjectRepository.Register("bound", new BoundObject(), false);

Resolves #3016
2020-01-21 08:39:23 +10:00
amaitland 926cd7243e BrowserSubProcess.Core.BrowserSubprocessExecutable - Return -1 when no type param specified as per the doc 2020-01-15 11:16:40 +10:00
amaitland 94e311844c Upgrade to CEF 79.1.10+g7ec49fa+chromium-79.0.3945.117 / Chromium 79.0.3945.117 2020-01-15 11:16:39 +10:00
amaitland 19a70727f2 WinForms/WPF/OffScreen - Improve Dispose/BrowserInitialized error messaging
- Set CanExecuteJavascriptInMainFrame to false when disposing
- Throw exception if Disposed when calling GetBrowser method
- Improve error messaging
2020-01-15 11:16:06 +10:00
Alex Maitland ad3d1d8244 Update appveyor.yml
Update build version number
2020-01-11 20:05:03 +10:00
amaitland fe83ba0aa5 OffScreen - Disable GPU Compositing 2020-01-08 16:46:49 +10:00
amaitland 1ef327cf9d Upgrade to CEF 79.1.3+ga5342ed+chromium-79.0.3945.88 / Chromium 79.0.3945.88 2020-01-08 16:46:48 +10:00
Alex Maitland 787079155b Update feature_request.md 2019-12-24 09:44:12 +10:00
Alex Maitland 922463c87d Update Readme.txt
Add .Net Core link and revise app.manifest entry
2019-12-21 09:01:12 +10:00
amaitland 57ab2ec982 WPF - Add CompositionTargetRenderHandler (experimental) 2019-12-13 21:07:25 +10:00
amaitland d693ece3ca Example - Fix more home.html links 2019-12-13 19:40:35 +10:00
amaitland c26053ae22 Example - Fix broken link in Home.html 2019-12-13 18:59:43 +10:00
amaitland 00f8cdf59b Core - ResourceHandler add Charset optional param to constructor or FromStream 2019-12-13 18:59:20 +10:00
amaitland 002f023b39 Core - Add Legacy ResourceHandler
Supports the old CEF code path
2019-12-13 18:54:05 +10:00
amaitland 453f8d2077 Core - ResourceHandler now reuses it's temp byte[] buffer 2019-12-11 18:21:19 +10:00
amaitland a6f4f75a0e Core - Add Cef.GetMimeType
Use the Chromium file extension to MimeType mapping.
The built in ResourceHandler.GetMimeType needs updating, doesn't support say webm for example.
2019-12-11 17:46:16 +10:00
amaitland c5c9271cb7 Core - WebBrowserExtensions.RegisterJsObject and WebBrowserExtensions.RegisterAsyncJsObject now throw NotImplementedException
Follow up to commit ffaff5d151.

Resolves #2990
2019-12-11 14:12:31 +10:00
amaitland ffaff5d151 Core - Remove WebBrowserExtensions.RegisterJsObject and WebBrowserExtensions.RegisterAsyncJsObject
This is a breaking change, these methods are being removed as they are used for LegacyBinding which is being drastically changed in #2977

Resolves #2990
2019-12-11 10:08:08 +10:00
amaitland a9d39d7965 Core - Add StreamResponseFilter
- Moved from the Cefsharp.Example.Filters.StreamResponseFilter
- Added CanWrite checks in InitFilter
- Updated example to reflect namespace change.
2019-12-10 18:31:38 +10:00
amaitland 1e88322b7d WinForms - Rename WinFormsWebBrowserExtensions to WebBrowserExtensions
Let's just keep it simple, we're in the WinForms namesapce, so we already know the context.
2019-12-10 08:09:22 +10:00