- Call CefBrowserHost.SetFocus(true) on the WinForms UI Thread to
workaround upstream issue, see code comment for more detail.
- Add OnSetInitialFocus to allow for providing custom behaviour
- MultiThreadedMessageLoop = false gets focus correctly from parent, no need
to call SetFocus(true)
https://bitbucket.org/chromiumembedded/cef/issues/3436/chromium-based-browser-loses-focus-when
- Previously when no Scale was specified, then the previous ChromiumWebBrowser scale was used.
- Now Viewport defaults to a scale of 1, so the behaviour has been changed so the scale passed as
the param is always used.
- Test updated
This is a minor breaking change.
Resolves#4091
- Simplification of calling the DevTools method
- Moved GetContentSizeAsync from OffScreen into partial class (now accessible from WinForms/WPF/OffScreen).
- Added menu option
Resolves#4081
Current DesignMode property is only true when the control is directly interacting with the designer.
This checks if an ancestor is in design mode to allow support for UserControls
Issue #4057
- 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
- Add IChromiumWebBrowserBase which is can be used for ChromiumWebBrowser instances and ChromiumHostControl
- Reduce code duplication for extensions methods
- Update WinForms Example
- Create ChromiumHostControlBase as common base class for ChromiumHostControl and ChromiumWebBrowser
- ChromiumHostControl is now the specific implementation for hosting popups
Has AddressChanged, LoadingStateChanged, etc events
- Can now access the IBrowser property via ChromiumHostControl.BrowserCore
- The ChromiumHostControl.IsBrowserInitialized event will be raised when
the underlying CEF browser has been created.
- 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
- All three implementations updated to include an IsDisposed check which
will simply return immediately
- OffScreen updated to match the WinForms behaviour
- WPF is more complex because of the initialAddress and Address properties
initialAddress will be set if the browser hasn't been created, if the browserCreated
has been created and OnAfterBrowserCreated hasn't been called then we'll set the Address
dependency property.
NOTE: For WinForms/OffScreen there's a small window
here between CreateBrowser and OnAfterBrowserCreated
where the Address prop will be updated, though LoadUrl
won't be called.
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.
* WinForms - Add LifeSpanHandler implementation capable of hosting popups as Tabs/Child controls in WinForms
- Update Example
- Remove PopupAsChildHelper and example LifeSpanHandler
- Examples always opens popups as tabs now.
- Improve xml doc and comments
- Make ParentFormMessageInterceptor public
- Make ChromiumHostControl public, move into CefSharp.WinForms.Host namespace
Rather than having the class in the CefSharp.WinForms namespace and potentially
confuse users, move into it's own namespace.
- Clarify ShowDevToolsDocked needs to be used with the new WinForms lifespan handler
As the browser is Disposed on a different Thread to OnAfterBrowserCreated is called there's possibility of an ObjectDisposedException.
Instead of locking just catch and ignore the error as it's extremely rare
Resolves#3437
- Add an UnWrap method to the interfaces (should be hidden from IntelliSense)
- For .Net 4.5.2 projects they're not a decorator class which an inner instance of the CefSharp.Core.Runtime Type
- For Net Core we have a ref assembly which allows us to reference the CefSharp.Core.Runtime without issues
We can potentially remove the ref assembly now and forgo any direct reference.
- When settings BrowserSettings/RequestContext properties the type checking needs to make sure the
CefSharp.Core.BrowserSettings and CefSharp.BrowserSettings objects are acceptable
- In WPF only the RequestContext was updated as there's no check for BrowserSettings property yet (probably should be)
https://github.com/cefsharp/CefSharp/issues/3343#issuecomment-757581368
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll
Partial rename, only Net Core, folder not renamed
* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore
Remove GenApi
* Core - Rename CefDragDataWrapper to DragData
Move into CefSharp.Core namespace
* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package
* Net Core - Refactor to have CefSharp.Core.dll contain only public Api
* Net Core - Remove CefSharp.Core.RefAssembly
* Net Core - Change CefSharp.Core.netcore output folder
* Net Core - Restructure nuget packages
* Net Core - Add Cefsharp.Core.Runtime.RefAssembly
* Net Core - Hide CLI/C++ classes from intellisense
Make sure users don't attempt to load them directly
* Rename CefSharp.Core to CefSharp.Core.Runtime
* Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant
Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version
* Rename CefSharp.Core.netcore to CefSharp.Core
* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU
As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll
* Convert RequestContextBuilder from C++ to C#
Now part of the CefSharp.Core PublicApi
* Update version number to 87.1.11
* Migrate more of the public Api to C#
* Net Core - Basic restructure complete
* Net Core - ModuleInitializer (Doesn't work yet)
* Remove direct references to BrowserSettings
* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl
* Net Core - Load libcef.dll via CLR Module initializer
If no RID is specified then we can load libcef.dll using the module initializer
* Add version to CefSharp.Core
* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets
* AnyCPU app.config transform
Improve AnyCPU support
* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU
* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore
* Fix Typos
Based on #3306
* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file
* Net Full - Generate CefSharp.Core.Runtime Ref Assembly
For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project
* Net Core - Old packages copy files to required folders
* Test - Install newer .Net Compiler and set Lang Version to 7.3
* Net Core - Exclude Net 452 Runtime generated reference source
* Core - Add Refactoring TODO
* Ref Assembly - Generate source as part of build
- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build
Runs locally, see if Appveyor has a problem with the powershell script execution
* Core - Add more factory methods to create instances of managed wrappers
* Net Core - Make Initialzier properties internal
Not quite sure what the public API should look like as yet, so making internal for now.
- Add InternalIsBrowserInitialized to partial class
- Move ThrowExceptionIfDisposed/ThrowExceptionIfBrowserNotInitialized to partial class
- Remove checks from DevToolsExtensions.ExecuteDevToolsMethodAsync as the checks were already in GetBrowser
In WPF it's no longer necessary to have a custom implementation, will leave the Dependency property
(won't action #3033 at this point in time)
- Add ChromiumWebBrowser.Partial.cs and include in all three projects
- Remove InternalsVisibleTo from Cefsharp.dll start moving code into the partial class
(We don't want to publish our internals as part of our Ref Assembly so this goings together)
#3082#3197
Proof of concept for a workaround. The frameId for the second OnContextReleased that arrives after the OnContextCreated from
the old render process strangely has a frameId greater than the new frameId
TODO: Unit tests
Issue #3021
This is a somewhat cosmetic change so the API Doc looks better, the
classes appear next to each other (CefSettings, CefSettingsBase)
when sorted alphabetically.
Resolves#3093
When true the browser will always be moved to a parking control when the ChromiumWebBrowser handle is destroyed.
By default it's only moved when RecreatingHandle = true;
Resolves#2840
If BrowserSettings is FrameworkCreated we dispose of the BrowserSettings object immediately,
this code was in ManagedCefBrowserAdapter::CreateBrowser, now it's duplicated in WPF/OffScreen
The WinForms version has a slightly different behaviour, we keep the browserSettings reference
until the Control is Disposed incase the Control handle is destroyed then Created again.
Issue #2840
Make it clear we are setting the default to DockStyle.Fill, this may not be expected
by some. It has been that way for 5+ years, so changing the default would be difficult
and unexpected, instead we make it clearer this is the case.
Resolves#3019