Commit Graph

6294 Commits

Author SHA1 Message Date
Alex Maitland f90271fb14 WPF - Improve Mouse Click Count
Chromium only supports values of 1,2,3 for clickCount so we
set click count to 1 if greater than 3

Resolves #3940
2022-01-04 10:44:31 +10:00
Alex Maitland d833c5e761 WinForms - ChromiumHostControl close CefBrowser on Dispose
- If you were to remove the ChromiumHostControl from it's parent Control and manually call Dispose()
  then the underlying CefBrowser wouldn't have been closed until the parent ChromiumWebBrowser is
  Disposed (all popups are disposed)
2022-01-04 10:31:36 +10:00
Alex Maitland dfc627efc5 Bug Report - Update cefclient version to 96.0.18 2022-01-04 10:14:41 +10:00
Alex Maitland f07be8c5e5 build.ps1 - Add new update-build-version target
Updated Version/AssemblyVersion

Performs some unnecessary tasks, so could be improved
2021-12-16 13:02:24 +10:00
Alex Maitland cbe0e855c6 WinForms - check if MainFrame.IsValid before calling LoadUrl
- Rewrite to directly use BrowserCore checking for null and IsDisposed to
avoid exceptions if at all possible.
- Check MainFrame.IsValid

As yet I've not seen a way to reproduce the actual problem, single reported case
so far at https://github.com/TV-Rename/tvrename/issues/862
2021-12-15 09:27:18 +10:00
Alex Maitland ba7c855353 WinForms - NullReferenceException in ChromiumWebBrowser.OnHandleDestroyed
- Check browserHost is not null

Resolves #3931
2021-12-15 09:11:18 +10:00
Alex Maitland 57d7b48f8d BrowserSubProcess - Change SetProcessShutdownParameters priority to 0x200
- Change to 0x200 which is low end of 'Application reserved "in between" shutdown range.'
- Remove logging as it wasn't working, must be too early to use the LOG(INFO) CEF macro

Test with a GetProcessShutdownParameters in debugger shows working e.g.

if (SetProcessShutdownParameters(0x200, SHUTDOWN_NORETRY))
{
	DWORD level = 0;
	DWORD flags = 0;
	GetProcessShutdownParameters(&level, &flags);
}

Issue #3155
2021-12-09 10:07:53 +10:00
Alex Maitland a6a66bed06 VS2022 - Very basic support for VS2022
Opening either solution in VS2022 should no longer prompt to upgrade VC++ version/Win10 SDK.

Having both VS2019 and VS2022 installed might be a problem if VS2022 doesn't have the required components installed.

Update .vsconfig Win10 SDK version to 19041 (same as Chromium requires for build)
2021-12-08 10:45:31 +10:00
Alex Maitland a79e83940b Net Core - Update Ref Assembly 2021-12-08 10:32:33 +10:00
Alex Maitland 8160ec1ce4 Remove IRequestContextHandler.OnBeforePluginLoad and IRequestContext.PurgePluginListCache
Resolves #3924
2021-12-07 14:54:11 +10:00
Alex Maitland f619a1a194 Upgrade to CEF 97.0.8+g4eb2da6+chromium-97.0.4692.36 / Chromium 97.0.4692.36 2021-12-07 14:46:51 +10:00
Alex Maitland 4313c9a25f BrowserSubprocess - Update shutdown priority (SetProcessShutdownParameters)
Issue #3155
2021-12-07 14:40:53 +10:00
Alex Maitland 51b2c74801 Core - Fix ExecuteScriptAsync infinite recursion
Resolves #3914
2021-12-01 05:47:01 +10:00
Alex Maitland b72d41353e WinForms - Improve hosting of popups using ChromiumHostControl
- Add IChromiumWebBrowserBase which is can be used for ChromiumWebBrowser instances and ChromiumHostControl
- Reduce code duplication for extensions methods
- Update WinForms Example
2021-11-30 13:47:42 +10:00
Alex Maitland 6e211bcc7f Wpf - Context Menu improvements/fixes
- Fix separator not showing
- Remove unused code
- Add consts for devtools menu command id's
2021-11-30 13:47:42 +10:00
Alex Maitland 165a05071d WinForms - ChromiumHostControl now has basic events
- Create ChromiumHostControlBase as common base class for ChromiumHostControl and ChromiumWebBrowser
- ChromiumHostControl is now the specific implementation for hosting popups
  Has AddressChanged, LoadingStateChanged, etc events
2021-11-30 13:47:41 +10:00
EmilyPaek 6f73ea1bba WPF - Korean IME fix cursor displayed at the left side of current character (#3912)
Co-authored-by: agrina1008 <noely1008@naver.com>
2021-11-30 13:47:16 +10:00
Alex Maitland eb21ea8c97 README.md - Update contact links
Use discussions for questions
2021-11-25 17:23:49 +10:00
Alex Maitland a84f623e8e DevTools Client - Upgrade to 96.0.4664.55 2021-11-25 13:36:44 +10:00
Alex Maitland 89b66f58d7 WPF - Use WPF specific menu handler by default
Resolves #1767
2021-11-25 11:09:38 +10:00
Alex Maitland 1b007b0ef5 README.md - Update in preparation for creation of 96 release branch 2021-11-25 11:03:26 +10:00
Alex Maitland 4d7c354f63 Update build number to 96.0.140 2021-11-25 11:01:57 +10:00
Alex Maitland 6e9e4a90a2 WinForms - ChromiumHostControl add BrowserCore and IsBrowserInitialized event
- Can now access the IBrowser property via ChromiumHostControl.BrowserCore
- The ChromiumHostControl.IsBrowserInitialized event will be raised when
the underlying CEF browser has been created.
2021-11-25 10:55:31 +10:00
Alex Maitland 129879cd20 WinForms - Add LifeSpanHandler.OnPopupBrowserCreated
- Add new fluent method to the WinForms specific LifeSpanHandler
- Allows simply access to the IBrowser
2021-11-25 10:00:37 +10:00
Alex Maitland 0fc3ae2323 Core - Add CefSettingsBase.IsDisposed
- Dispose CefSettingsBase
- Take a copy of the CefSettings struct and free our pointer
2021-11-25 09:45:29 +10:00
Alex Maitland 3130caf737 Upgrade to CEF 96.0.14+g28ba5c8+chromium-96.0.4664.55 / Chromium 96.0.4664.55 2021-11-24 13:33:07 +10:00
Alex Maitland e7f1ea3189 Test - Skip LoadLegacyJavaScriptBindingQunitTestsSuccessfulCompletion when run via AppVeyor
Is failing all the time now.

Issue #3867
2021-11-19 10:17:14 +10:00
Alex Maitland 5447c8d904 Nuget - Set IncludeInVsix = true for <Content/> entries 2021-11-18 13:28:37 +10:00
Alex Maitland 9b63b0caab Upgrade to CEF 96.0.13+g622afbd+chromium-96.0.4664.45 / Chromium 96.0.4664.45 2021-11-18 10:01:19 +10:00
Alex Maitland d8674fd076 OffScreen - Add CaptureScreenshotAsync, GetContentSizeAsync and ResizeAsync
- Simply taking full page screenshots
- Added new methods
- CaptureScreenshotAsync uses Devtools protocol and allows for specifying image format and quality (if jpg)

Cannot use clip param as https://bitbucket.org/chromiumembedded/cef/issues/3103/offscreen-capture-screenshot-with-devtools
2021-11-16 13:41:26 +10:00
Benedikt Brückmann 10c575b2c0 README.md: correct CEF Version to 4638 for CefSharp 95 (#3878)
according to https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding the 95 release branch is 4638, instead of the stated 4606 of the 94 release
2021-11-11 18:43:21 +10:00
Alex Maitland c54205efae Upgrade to CEF 96.0.12+g147b5f5+chromium-96.0.4664.35 / Chromium 96.0.4664.35 2021-11-11 09:47:59 +10:00
Alex Maitland cbd5f3f00b Upgrade to CEF 96.0.11+g4bd7c35+chromium-96.0.4664.35 / Chromium 96.0.4664.35 2021-11-10 10:59:43 +10:00
Alex Maitland e2e986c741 README.md - Update as 95.7.141 release 2021-11-06 10:40:02 +10:00
Alex Maitland 6fcfb66cbb WPF - OnWindowStateChanged only set browser to visible if IsVisible = true
Previously all browser instances were set to visible when the window was restored from minimized state
2021-11-05 10:39:11 +10:00
Alex Maitland aa8403a5d6 WPF - Add ChromiumWebBrowser.OnBrowserWasHidden
Can be overridden to keep the browser in a visible state even when it's not displayed
on screen.
2021-11-05 10:29:36 +10:00
Alex Maitland 88cf0a9879 DevTools Client - Upgrade to Chromium 95.0.4638.54 2021-11-01 13:53:33 +10:00
Alex Maitland 52f40e3e84 Core - Update CefErrorCode.DnsNameHttpsOnly
It should be a negative number

https://source.chromium.org/chromium/chromium/src/+/651bd32d5d559010ed5dd44aee0f33c7a0162301:net/base/net_error_list.h;dlc=190de627f4460740328ecffcfadce8bb8d5aec8b
2021-11-01 13:35:03 +10:00
Alex Maitland a7aea1821e Core - WaitForInitialLoadAsync set to Cancelled if control is Disposed 2021-11-01 13:27:09 +10:00
Alex Maitland 7e0a32af53 Upgrade to CEF 95.7.14+g9f72f35+chromium-95.0.4638.69 / Chromium 95.0.4638.69 2021-11-01 13:19:55 +10:00
Alex Maitland d46f6380ad Core - Cef.InitializeAsync add optional IBrowserProcessHandler param
Issue #3634
2021-10-28 11:10:08 +10:00
Alex Maitland 4112340e48 Core - LoadUrlAsync require url and remove SyncContext param
- Remove url optional null, a Url is now required and an exception will be
  thrown if null or empty. If the browser wasn't loading an null was passed
  in then the task would have never resolved. This provides a predictable behaviour.
  A new WaitForInitialLoadAsync method was added to simplify waiting for initial
  browser load.
- Remove SynchronizationContext param, best to let the framework handle

Issue #3842
2021-10-28 10:51:18 +10:00
Alex Maitland 4a07af26e9 Core - Rename WaitForBrowserInitialLoadAsync to WaitForInitialLoadAsync and simplify
- Initial intention was to have a reusable method that could be used CefSharp.Wpf.HwndHost,
  upon further deliberation I've decided to build the functionality into the ChromiumWebBrowser.Partial.cs
  and will need to duplicate the functionality in CefSharp.Wpf.HwndHost. This guarantees that the
  Task will be resolved in all cases. The previous implementation there was a theoretical change we'd
  miss subscribing to the relevant events
- Remove CancellationToken as it's not possible to cancel

Issue #3842
2021-10-28 10:31:03 +10:00
Alex Maitland 91b7514a1c WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync
Second attempt at WaitForBrowserInitialLoadAsync, includes optional
CancellationToken param.

Issue #3842
2021-10-27 13:58:57 +10:00
Alex Maitland c832f7b7be Core - V8Serialization incorrectly returns negative numbers
- CEF doesn't differentiate between UINT and INT
  so we have to do some additional bounds checking
  To make sure the correct value is returned
- Add xUnit tests

Issue #3858
2021-10-27 09:58:31 +10:00
Alex Maitland fe9904e952 Core - WinUseBrowserSpellChecker is now disabled upstream
https://bitbucket.org/chromiumembedded/cef/pull-requests/415
2021-10-27 09:56:14 +10:00
Alex Maitland 9993aa78e0 OffScreen - Create Browser when Global CefRequestContext initialized.
- GlobalContextInitialized wraps a TaskCompletionSource which is resolved
  when the Global CefRequestContext has been created
- Reduce code duplication

If successful we can apply the same changes to WinForms/WPF though they're less likely to have
issues than the OffScreen implementation as the CreateBrowser doesn't happen until much later

Issue #3850 #3634
2021-10-26 14:31:10 +10:00
Alex Maitland 239372a780 Test - Rearrange Assert args 2021-10-26 13:57:27 +10:00
Alex Maitland ece5119e43 Test - Update HelloWorld.html to include JS so can be used for testing 2021-10-23 11:38:49 +10:00
Alex Maitland 1524482ede Core - Add Cef.InitializeAsync
- InitializeAsyncBrowserProcessHandler is used to complete the taskCompletionSource
  when OnContextInitialized is called
- Update the OffScreen example to be async with a simply SingleThreadSynchronizationContext
  to ensure we continue on our main thread.

Issue #3634
2021-10-22 20:10:38 +10:00