Commit Graph

5832 Commits

Author SHA1 Message Date
amaitland bdc7bcfabc Upgrade DevTools to Chrome 92.0.4515.131 v92.0.251 v92.0.250-pre 2021-08-10 15:08:23 +10:00
amaitland 9df9b43b3b Upgrade build version to 92.0.250 2021-08-10 14:57:32 +10:00
campersau f27b489e58 DevTools Client - Generic ExecuteDevToolsMethodAsync and add RegisterEventHandler (#3674)
* Make ExecuteDevToolsMethodAsync generic

* Make RegisterEventHandler generic

* PR feedback and added test for registering multiple event handlers

* Updated generated code to latest version

* Fix possible NRE when removing event listener before adding one
2021-08-10 14:51:56 +10:00
amaitland 90cbf84a05 Upgrade to CEF 92.0.25+gd15cfa8+chromium-92.0.4515.131 / Chromium 92.0.4515.131 2021-08-10 14:37:53 +10:00
Alex Maitland 825f5d7fd7 DevToolsClient - AccessViolationException: Attempted to read or write protected memory
Issue #3725
2021-07-31 19:34:38 +10:00
Alex Maitland 39bd689fba BrowserSubprocess - remove unused file from .vcxproj.filters 2021-07-31 14:01:57 +10:00
Alex Maitland ccbe147f38 Examples/Test - Upgrade to .Net 4.7.2
- Reinstall nuget packages to retarget to net472

This brings the branch inline with current `master` and will make it easier to cherry pick CEF update commits
2021-07-31 14:01:32 +10:00
Alex Maitland 9755a1af61 Upgrade to CEF 92.0.20+g7cfecf1+chromium-92.0.4515.107 / Chromium 92.0.4515.107 2021-07-31 11:18:01 +10:00
Alex Maitland 15f7011440 Core - Throw exception if calling Cef.Initialize after calling Cef.Shutdown 2021-07-30 15:13:53 +10:00
Alex Maitland 154afa3f30 WPF - WritableBitmapRenderHandler ArgumentOutofRange
Resolves #3474
2021-07-30 10:30:53 +10:00
Alex Maitland 12a0045dc8 WinForms/WPF/OffScreen - Use custom FocusHandler when disposing to block taking focus
This was added as a workaround for Issue #3715 which is specific to WinForms
and will hopefully be fixed upstream.

I've added the logic to all three implementations as I think the behaviour should be
consistent across all implementations.
2021-07-30 10:30:52 +10:00
Alex Maitland af593f214c Nuget - Manually copy CefSharp Common files after initial Nuget restore
Follow up to https://github.com/cefsharp/CefSharp/commit/24d64c427e8d41709230baf460cb8c803048dc54
2021-07-24 16:12:31 +10:00
Alex Maitland 0504c33bc6 Nuget - Manually copy files after initial Nuget restore
One final attempt to workaround https://github.com/dotnet/project-system/issues/4158

The None/Content entries aren't picked up as the .targets file doesn't exist before the Nuget restore (only when using packages.config)
Attempt to copy the files via calling CefRedist32CopyResources/CefRedist64CopyResources tasks.
Properties aren't accessible, I believe that tasks should be, so hopefully this copies the files.

Build actions like Publish are very unlikely to work correctly as the files won't have been included via the <Content/> entries.
2021-07-24 15:51:08 +10:00
Alex Maitland 3a6334a16f Nuget - Disable AnyCPU check for BuildTransitive Library Projects
Issue #3622
2021-07-24 15:49:24 +10:00
campersau 71751c3a8d WPF - Simplify Support Shift + AltGr (#3701) 2021-07-24 15:47:20 +10:00
Alex Maitland 70a7ba1536 Example/Test - Use the new CefRedist32CopyResources/CefRedist64CopyResources targets
On Nuget restore the CefRedist32/CefRedist64 properties aren't accessible until after the project has been closed
and reopened. (Think clean checkout where the packages folder doesn't exist).
The Targets behave different and can be called, so this works around the problem.
2021-07-24 11:20:43 +10:00
Alex Maitland 00f9afad3a Upgrade to CEF 92.0.16+g3492b1b+chromium-92.0.4515.107 / Chromium 92.0.4515.107 2021-07-22 15:45:19 +10:00
Alex Maitland f9f6f202d6 Core - Add IBrowser.IsValid
- Add IBrowser.IsValid
- Update xml doc comments
- Remove ExecuteScriptAsync CanExecuteJavascriptInMainFrame check as CEF should now internally queue commands for ExecuteScript and LoadRequest

https://bitbucket.org/chromiumembedded/cef/issues/2421/add-onframecreated-onframedeleted#comment-60616371

Issue #3588
2021-07-22 15:04:56 +10:00
Alex Maitland b45176a1df Core - Xml Doc improvements/fixes 2021-07-22 15:04:55 +10:00
Alex Maitland 6e95ac2a92 Test - Minor cleanup 2021-07-22 15:04:55 +10:00
Alex Maitland fc3a41ea82 DevTools Client - Follow up to #3669
- Improve xml doc
- Reduce code duplication
2021-07-22 15:03:45 +10:00
campersau fecb481f72 DevTools - Support strongly typed events (#3669)
Includes various other DevTools fixes:
- JavaScript "number"s are represented as doubles instead of longs
- Headers are now correctly serialized / deserialized
- DevToolsDomainErrorResponse is now correctly deserialized
2021-07-22 15:03:44 +10:00
Alex Maitland fb6f289ebd Core - Update FileThreadTaskFactory thread
TID_FILE was removed in commit https://bitbucket.org/chromiumembedded/cef/commits/ff8f4a7217189645a98b8affc45641cafe232f73
Use TID_FILE_BACKGROUND
2021-07-22 15:02:58 +10:00
Alex Maitland e41c4a8202 WPF - Improve WpfIMEKeyboardHandler browserHost null checks
CancelComposition is now private as it's not used outside the scope of the class. Technically this is a breaking change
though it's incredibly unlikely this method was used outside the scope of WpfImeKeyboardHandler as it requires
the Hwnd which is obtained from the SourceHook which is private.

We can and probably should make most of the private methods protected virtual to allow for overriding of just a small
portion of the class, you currently can copy and paste the whole class into your own code base if small changes are required.

#3690
v91.1.230
2021-07-22 10:32:36 +10:00
Shaojun Li bcf338f7ea WPF - Fix WpfIMEKeyboardHandler crash when browser is not initalized. (#3690)
GetBrowserHost will throw exception when browser is not initalized.
2021-07-22 10:18:13 +10:00
Alex Maitland 734cb8f158 Core - Crash opening popup window
Upstream changes mean that extraInfo can now be null (https://bitbucket.org/chromiumembedded/cef/issues/3123/convert-legacy-ipc-messages-to-mojo)
We currently only send extra Info for the main browser and not for popups.
Assign the _jsBindingPropertyName/_jsBindingPropertyNameCamelCase properties
by default and only update when the user has specified their own name.

It's not currently possible to have different naming in the same render process (was previously the case).

Issue #3670
2021-07-22 10:14:41 +10:00
Alex Maitland b4d87d740b Update to CEF 91.1.23+g04c8d56+chromium-91.0.4472.164 / Chromium 91.0.4472.164 2021-07-22 10:07:12 +10:00
Alex Maitland 35d839d62e Update build version to 91.1.211 v91.1.211 2021-06-27 19:45:57 +10:00
Alex Maitland 17763e9ec4 Core - MethodRunnerQueue add additional IsCancellationRequested checks 2021-06-27 19:44:34 +10:00
Alex Maitland 1078ea317d Test - Add MethodRunnerQueueFacts.DisposeQueueThenEnqueueMethodInvocation
Test to validate that MethodRunnerQueue doesn't have the same issues as #3639
2021-06-27 19:44:34 +10:00
Alex Maitland 3c6ca74273 Nuget - Only run CefSharpExcludeCoreRuntimeBeforeGenerateApplicationManifest for packages.config projects
When using Non SDK Stlye project with PackageReference and publishing with ClickOnce the CefSharp.Core.Runtime.*
files were missing from the installer.

Far as I can tell ClickOnce publishing isn't supported for SDK Style projects so just disable for PackageReference for now

https://github.com/cefsharp/CefSharp/discussions/3613#discussioncomment-913061
2021-06-27 19:44:17 +10:00
Alex Maitland c7a4fc8e6e Core - ConcurrentMethodRunnerQueue.Enqueue throws InvalidOperationException
When ConcurrentMethodRunnerQueue.Dispose is called from a different thread it appears that
the CancellationTokenSource is cancelled (via Dispose) inbetween creation of the Task
and calling Task.Start(TaskScheduler).

Switch from using Task constructor and Task.Start to the preferred Task.Run method.

Added additional unit tests.

Issue #3639
2021-06-27 19:44:16 +10:00
ptrsky aa8a02f5de WPF - Add support for Shift+AltGr (#3627)
* WPF - Add support for Shift+AltGr

The handling of AltGr characters in CefBrowsterHostWrapper did not cover capital diacritic letters. This commit adds handling for the Shift + AltGr + character combination.

* WPF - Shift+AltGr review fixes

* Trigger rebuild
v91.1.210
2021-06-21 15:16:41 +10:00
Alex Maitland 16c141357f Upgrade to CEF 91.1.21+g9dd45fe+chromium-91.0.4472.114 / Chromium 91.0.4472.114 2021-06-21 15:14:39 +10:00
Alex Maitland 1bc80fae65 Upgrade build version number to 91.1.160 v91.1.160 2021-06-17 12:46:52 +10:00
Alex Maitland 754ec58145 DevTools Client - Update to Chromium 91.0.4472.101
No changes actual API changes.
2021-06-17 12:39:04 +10:00
Alex Maitland e189e4c6ae Upgrade build version number 2021-06-14 19:32:16 +10:00
Alex Maitland bd847f844f Upgrade to CEF 91.1.16+gc95b2a1+chromium-91.0.4472.101 / Chromium 91.0.4472.101 2021-06-14 19:29:28 +10:00
Alex Maitland c1ef094953 DevTools Client - Fix Net Core build error 2021-06-10 16:17:45 +10:00
Alex Maitland 2f2ab2b9df DevTools Client - Update to Chromium 91.0.4472.77 2021-06-10 10:24:50 +10:00
Alex Maitland 6d218c2641 JavacriptBinding - JavascriptBindingApiEnabled fix merge mistake
JavascriptBindingApiEnabled should be outside of legacy binding enabled
Not an issue in master, must have been broken during merge
v91.1.60-pre
2021-06-05 14:37:03 +10:00
Alex Maitland 8963b12d12 Test - JsBindingGlobalApiDisabled ensure page loaded successfully 2021-06-05 14:35:04 +10:00
Alex Maitland 41086fe2b1 Core - OwinResourceHandler RequestQueryString remove leading '?'
Uri.Query returns the leading '?', as per the OWIN spec the leading '?' needs to be removed
owin.RequestQueryString | A string containing the query string component of the HTTP request URI, without the leading "?" The value may be an empty string.

Issue https://github.com/amaitland/Chromium.AspNetCore.Bridge/issues/7
2021-06-05 14:15:17 +10:00
Alex Maitland 46c51a6253 WinForms - IWinFormsWebBrowser now implements IWin32Window, IComponent, ISynchronizeInvoke
Allows access to methods like BeginInvoke()
2021-06-05 13:15:13 +10:00
Alex Maitland f310370d33 WinForms - Hide/Show internal browser when Visible change
- ChromiumHostControl Add On OnVisibleChanged override
- ChromiumHostControl reorder OnSizeChanged so resize
  happens before event for consistency

Follow up to #2922
2021-06-05 11:22:23 +10:00
Alex Maitland 21d4415ae6 Revert "WPF/WinForms/OffScreen - Enable Chromium Site Isolation"
This reverts commit 2366912a07.
2021-06-05 10:19:23 +10:00
Alex Maitland 5fda692074 Test - Upgrade LoadRequestAsync extension to handle load errors 2021-06-05 10:19:08 +10:00
Alex Maitland 4eb94c4e3d AnyCPU - Add CefRuntime.SubscribeAnyCpuAssemblyResolver/LoadCefSharpCoreRuntimeAnyCpu
Simplify using CefSharp when targeting AnyCPU, it's now possible to include this as library code
now that CefSharp.dll targets AnyCPU.

There is no .Net Core/.Net 5.0 implementation of this class as the CefSharp.Core.Runtime.dll
is already loaded dynamically based on architecture.

- Call CefRuntime.LoadCefSharpCoreRuntimeAnyCpu to immediately load the CefSharp.Core.Runtime.dll
and all dependant resources will be loaded based on this instance
- Call LoadCefSharpCoreRuntimeAnyCpu.SubscribeAnyCpuAssemblyResolver to use load assembly
  when required.
2021-06-04 16:57:09 +10:00
Alex Maitland 1fe1fd5fbe Example - AudioHandler now extends CefSharp.Handler.AudioHandler
Fixes compile error as IAudioHandler now implements IDisposable
2021-06-04 16:55:28 +10:00
Alex Maitland 23103cb6bb Core - IAudioHandler now implements IDisposable
IAudioHandler.Dispose is called when the ChromiumWebBrowser instance is being Disposed.

This is a breaking change.

Resolves #3598
2021-06-04 15:52:05 +10:00