* Core - Improve ClientAdapter::GetBrowserWrapper logic
Simplify the logic
- For non popup return immediately (most common scenario)
- Check for IBrowser instance for matching popup
- Check for HasParent and return the browser Instance
- Return nullptr if no matching IBrowser wrapper found
* Core - ClientAdapter::OnFrameCreated called before OnAfterCreated
- The very first call to ClientAdapter::OnFrameCreated happens
before OnAfterCreated leaving us with a IBrowser instance that's null
Create an IBrowser instance that's scoped to the method call
* Core - ClientAdapter improve HasParent checks
- HasParent check has now been replaced with IsHostedBrowser
which has additional check to make sure the internal
IWebBrowser.Set* methods are only called for a IBrowser
instance that's directly associated with a ChromiumWebBrowser instance
This resolves issues with DevTools being opened for a popup hosted
in a ChromiumWebBrowser instance.
Related discussion https://github.com/cefsharp/CefSharp/discussions/4438
- Moves the Dependency of System.Text.Json from CefSharp.dll
BrowserSubProcess as a result no longer has a reference
where wasn't required for it's operation.
Resolves#4428#4427
- If the popup is being hosted on a Form that is being Closed/Disposed
as we attempt to call Control.Invoke we can end up with an ObjectDisposedException
- This is only for local builds, we still only ship a .Net Core 3.1 exe (.Net 5.0 for arm64)
- Potentially we should always use the netcoreapp3.1 exe to mimic what's happening when using the nuget packages
That would require changes to the .targets file to copy the correct exe based on arch
- Chromium now enables DPI awareness programmatically by default
- Remove Cef.EnableHighDPISupport calls and mark as obsolete
- Remove dpiawareness entries from app.manifest
Issues #4417#4410
- When Nuget packages are managed centrally the build will break when no RuntimeIdentifier is specified
as the .targets file includes <PackageReference/> entries for the chromiumembeddedframework.runtime packages.
For now when ManagePackageVersionsCentrally exclude the <ItemGroup />
Issue #4362
- Start splitting tests out into own files where relevant
- Improve call ordering
- Use Assert.RaisesAsync where possible
- Classes have been renamed (Tests is now the standard suffix)
TODO: Some of the classes still need their method names changed