* Core - Cancel pending tasks when browser crashed or v8 context gets released
* Use TrySetCanceled to cancel pending tasks
* Adjust test to use chrome://crash for simulating a crash
* Add tests for javascript callbacks
* Rename tests and add tests for calling Execute multiple times
* Move FramePendingTaskRepository to its own file
* Rename test to ShouldCancelAfterV8ContextChange
* Fix compile error on .NET Framework
* adjust ShouldTimeoutIfNavigationOccurs test which now throws a TaskCanceledException on navigation
* Implement AcceleratedPaintInfo so the shared texture can be used for accelerated rendering in a custom IRenderHandler.
* Make AcceleratedPaintInfo members get-only properties, set via constructor.
Add XML comments, based on CEF.
---------
Co-authored-by: Dennis de Bruijn <d.de.bruijn@tss.nl>
Return true and execute callback either
asynchronously or in this method to continue or cancel the download.
Return false to proceed with default handling (cancel with Alloy style,
download shelf with Chrome style).
* Upgrade minimum .Net version to 4.6.2
#4433
* Use TaskCreationOptions.RunContinuationsAsynchronously
- Now that min version is .Net 4.6.2 we can use RunContinuationsAsynchronously
- Remove some unused code
* 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
- When CEF added CefFrameManager support the lifespan of a frame changed, it's now possible for MainFrame/FocusedFrame
to be null when the browser is closed.
Issue #4368
Logs some basic information so we can see what type of ChromiumWebBrowser hasn't been closed
within as part of the xUnit tests.
* Meant for internal use and might be subject to change.
CEF is now using Chrome file dialogs on all platforms and runtimes, this brings a number of fixes and also some API changes.
- The selectedAcceptFilter filter arg has now been removed
- The CefFileDialogFlags enum has been removed as CEF no longer supports these options
This is a breaking change.
Issue #4110
- Previously a new PendingTask(TaskCompletionSource) was created using a new Id which worked when the Ids matched
between the browser and render process. If you skipped executing a callback then the Ids would get out of sync.
Issue #3979
- The methods in CefResourceRequestHandlerAdapter previously passed on a scoped instance of
IBrowser which would have been disposed when the method was executed. This made it very
difficult to use the callback in OnBeforeResourceLoad so now we check to see if we
already have an IBrowser instance with the matching Id and only use a scoped instance
if we don't have a match.
- 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
- FrameHandler now tracks frame creation and removal and reuses the IFrame reference
- CefFrameWrapper no longer throws exception if accessing Identifier for invalid frame, this appears
to be a valid use case now which makes sense otherwise we'd never be able to identify the frame.
Resolves#3588