Commit Graph

5962 Commits

Author SHA1 Message Date
Alex Maitland 22bdd65c17 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
v95.7.141
2021-11-05 10:39:37 +10:00
Alex Maitland 5ee96f91c1 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:39:36 +10:00
Alex Maitland 6a235c3829 DevTools Client - Upgrade to Chromium 95.0.4638.69 2021-11-01 14:16:15 +10:00
Alex Maitland efe5f3012f DevTools Client - Upgrade to Chromium 95.0.4638.54 v95.7.140-pre 2021-11-01 13:54:02 +10:00
Alex Maitland 11107e0dd9 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:54:02 +10:00
Alex Maitland 1806ce3bc1 Core - WaitForInitialLoadAsync set to Cancelled if control is Disposed 2021-11-01 13:26:30 +10:00
Alex Maitland 64df9b99d4 Upgrade to CEF 95.7.14+g9f72f35+chromium-95.0.4638.69 / Chromium 95.0.4638.69 2021-11-01 13:20:49 +10:00
Alex Maitland 59b3d43a53 Core - Cef.InitializeAsync add optional IBrowserProcessHandler param
Issue #3634
2021-10-28 11:09:35 +10:00
Alex Maitland b0d19f70be 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 11:04:48 +10:00
Alex Maitland e8e6eb892e 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 11:04:48 +10:00
Alex Maitland 3221c4bf41 WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync
Second attempt at WaitForBrowserInitialLoadAsync, includes optional
CancellationToken param.

Issue #3842
2021-10-28 11:04:48 +10:00
Alex Maitland 482b4239ec 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-27 09:59:33 +10:00
Alex Maitland 4c02e3e926 Test - Rearrange Assert args 2021-10-27 09:59:04 +10:00
Alex Maitland 8797880612 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:55 +10:00
Alex Maitland d3f1b3b68e Core - WinUseBrowserSpellChecker is now disabled upstream
https://bitbucket.org/chromiumembedded/cef/pull-requests/415
2021-10-27 09:58:55 +10:00
Alex Maitland 18d5002225 appveyor.yml - Update as release branch 2021-10-26 13:11:42 +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
Alex Maitland c7e477b306 WebBrowserExtensions - Hide RegisterJsObject and RegisterAsyncJsObject from intellisense
They're obsolete and will throw exceptions anyway, only exist to point upgrading users to the correct doco
2021-10-22 16:29:21 +10:00
Alex Maitland 5bf5d98fac Net Core - Update ref assembly 2021-10-22 14:48:31 +10:00
Alex Maitland 0e242a8706 Upgrade to CEF 95.7.10+g00d4ad5+chromium-95.0.4638.54 / Chromium 95.0.4638.54
Remove CefBrowserSettings.universal_access_from_file_urls and CefBrowserSettings.file_access_from_file_urls.
https://bitbucket.org/chromiumembedded/cef/commits/ff33d7f72144

Remove CefBrowserSettings.application_cache
https://bitbucket.org/chromiumembedded/cef/commits/370a7749e950ef6784c29a666d07a0b67148dd5f

Remove ignore_certificate_errors setting
https://bitbucket.org/chromiumembedded/cef/commits/aabe4ce466766f8bd9907e7fa30546a3afada214

RequestContextSettings.IgnoreCertificateErrors was removed, the CefSettings.IgnoreCertificateErrors property
now set the command line arg

Use CefRect for CefWindowInfo bounds
https://bitbucket.org/chromiumembedded/cef/commits/8587cc4e4bbc187aa989152e521318818b3f41d3

Additional overload has been added to pass in a Rect directly to SetAsChild

Rename SendFocusEvent to SetFocus
https://bitbucket.org/chromiumembedded/cef/commits/49a4611e28d7bbc221cff816d7c4a96c55ba2721

SendFocusEvent will now call SetFocus internally, the project internally has been updated to use SetFocus for WPF

Replace CefRequestCallback with CefCallback
https://bitbucket.org/chromiumembedded/cef/commits/3e7f1bb529442a6c7674262d9219df57964e9524

No changes to the API for this, I've kept the same interface and just mapped internally

Resolves #3857, #3667, #3668
2021-10-22 14:45:12 +10:00
Alex Maitland 4df57e32bb Net Core - Nuget CefSharpBuildAction default to NoAction for Library projects
This should cleanup Library projects bin folders and eliminate stray copies of project files
when a Library RuntimeIdentifier/PlatformTarget doesn't match the WinExe/Exe project

For plugins the files will be included when EnableDynamicLoading = true

Can be overridden be adding <CefSharpBuildAction>Default</CefSharpBuildAction> to your project file

https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support#plugin-with-library-dependencies
2021-10-22 10:37:20 +10:00
Alex Maitland c3f48fef3d Nuget - VS2022 remove extra CefSharp.Core.Runtime.dll copy from bin folder
VS2022 differs from previous versions in how the file paths appear to work. Use a filter to match based on filename + extension
rather than an exact file path match.

I've also updated the CefSharpAnyCPUExcludeCoreRuntimeBeforeGenerateApplicationManifest target to include a similar filter.
Leaving CefSharpExcludeCoreRuntimeBeforeGenerateApplicationManifest as is because it's only for VS2017

In VS2019:

C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.dll;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.pdb;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.xml

In VS2022:
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.dll;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.pdb;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.xml

Issue #3854
2021-10-22 10:04:46 +10:00
Alex Maitland f8b96ecf5d Nuget - Fix formatting 2021-10-22 09:42:11 +10:00
Alex Maitland dfa6d979da Test - Update WaitForQUnitTestExeuctionToComplete to ignore other messages 2021-10-21 13:36:50 +10:00
Alex Maitland 4f51b8a4b2 Upgrade to CEF 94.4.11+gc4d96f0+chromium-94.0.4606.81 / Chromium 94.0.4606.81 2021-10-21 10:25:42 +10:00
Alex Maitland ae1d38437d Update build version to 94.4.90 2021-10-16 17:53:44 +10:00
Alex Maitland a441c1a318 Test - Attempt to log more detailed failure from JSB Tests
Currently only some of the legacy tests are failing with Chromium Site isolation enabled
2021-10-16 17:52:39 +10:00
Alex Maitland 188a1b9cf4 CefSharp3.sln - Change CefSharp.Example to AnyCPU for release builds 2021-10-16 17:36:16 +10:00
Alex Maitland aedd60e3ff Upgrade to 94.4.9+g09ee681+chromium-94.0.4606.71 / Chromium 94.0.4606.71 2021-10-16 13:40:20 +10:00
Alex Maitland aac5439a5c Test - Fix compile error 2021-10-14 19:37:15 +10:00
Alex Maitland 439970d8cc Test - Fix NetCore test case 2021-10-14 19:28:53 +10:00
Alex Maitland 1a854192e5 Test - Output QUnit results if tests failed 2021-10-14 13:00:08 +10:00
Alex Maitland db9e041a3e build.ps1 - Remove TernaryReturn as no longer used 2021-10-14 12:58:42 +10:00
Alex Maitland f904b88387 build.ps1 - Improve vswhere programfiles check 2021-10-14 12:43:35 +10:00
Alex Maitland 221185bf28 WinForms/WPF/OffScreen - Enable Chromium Site Isolation by default
Previously was disabled by default

Can still be disabled via disable-site-isolation-trials command line argument

Issue #2967
2021-10-14 10:16:27 +10:00
Alex Maitland fd78c0cffc Test - CanLoadRequestWithPostData now navigates to domain of same origin first
When Chromium Site Isolation is enabled we must first navigate to
a web page of the same origin to use LoadRequest
When Site Isolation is disabled we can navigate to any web page
https://magpcss.org/ceforum/viewtopic.php?f=10&t=18672&p=50266#p50249

Issue #2967
2021-10-14 10:11:33 +10:00
Alex Maitland c72e21cb36 build.ps1 - Nuget Package only a subset of architectures
- Can now build/package only a subset of architectures
- Remove file elements from nuspec if arch wasn't specified
- Reorder and simplify script

.\build.ps1 -BuildArches "x64"

Issue #3706
2021-10-14 09:39:12 +10:00
Alex Maitland 7c2226caff Nuget - Update dependency groups
Resolves nuget pack warning
2021-10-14 09:39:12 +10:00
Alex Maitland 8aa0ee5e9f build.ps1 - Cleanup
- Fail fast if nuget.exe not found
- Check for VSWhere at build start
  (should always be installed as it's included in VS2019 and above)
- Remove netcore31 from $Target valid set, we'll just rely on the
  $TargetFramework
- Push-Location to working directory for easier debugging
2021-10-14 09:39:12 +10:00
Alex Maitland 13c725c1ce build.ps1 - Reorder scripts so functions are declared first 2021-10-14 09:39:11 +10:00
Mitch Capper 7c57c106e5 Add netcore to toolchain (it uses same VS version) 2021-10-14 09:39:11 +10:00
Mitch Capper da0f33bf98 Added vs2022 support and v143 targetting. VS2022 can also build V142 but requires some additions to the project files to indicate targeting it instead. This should not change behavior for anyone as you must specific specify the 2022 target for it to work. 2021-10-14 09:39:11 +10:00
Mitch Capper 2af10bfd8f build.ps1 and build.netcore.ps1 merge and architecture target added 2021-10-14 09:39:11 +10:00
Alex Maitland 66bb6c0f68 Nuget - Remove netcoreapp3.0 hacks
For those unable to upgrade to .Net Core 3.1 then the old packages should still be usable by specifying AssetTargetFallback as detailed in https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#assettargetfallback

Resolves #3444
2021-10-13 11:50:00 +10:00
Alex Maitland 42e7b902b3 appveyor.yml - Update CefSharp.Test.dll path
Runtime identifier was changed to win7-x64 so the path changed
2021-10-13 09:14:22 +10:00
Alex Maitland bd88019327 Test - Add RuntimeIdentifiers and fix build.ps1
- Seems the Nuget restore doesn't work correctly without having RuntimeIdentifiers set
  Must also set RuntimeIdentifier manually so the files are copied correctly.
- Move the msbuild restore after the vcvarsall.bat call so the script runs successfully
2021-10-13 09:04:13 +10:00
Alex Maitland ee431d7add Test - Add RuntimeIdentifiers so libcef.dll etc copied to output folder
- Adding <RuntimeIdentifiers/> didn't work as expected so set RuntimeIdentifier based on PlatformTarget
- Updated appveyor.yml as output path for CefSharp.Test.dll changed
2021-10-13 07:06:59 +10:00
Alex Maitland 5356e1b89e Test - Update Nuget PackageReferences
- Forgot to change to the chromiumembeddedframework.runtime package
- Simplify references

Follow up to https://github.com/cefsharp/CefSharp/commit/67a08c47eedf0bb76493a63e99a467f23cf7cf73

Issue #3706
2021-10-13 05:15:34 +10:00
Alex Maitland 67a08c47ee BrowserSubProcess/Examples/Tests - Migrate to newer SDK Style projects
- Migrate to new SDK style projects
- Migrate to chromiumembeddedframework.runtime packages
- Remove old packages.config files
- Update post build event for BrowserSubprocess to set TSAware/LargeAddressAware
- Change project build order

Issue #3706
2021-10-12 19:48:11 +10:00