CefSharp icon indicating copy to clipboard operation
CefSharp copied to clipboard

Funding Request - Release 63.0.0

Open amaitland opened this issue 8 years ago β€’ 34 comments

A big thank you to all those who had pledged funding to my Patreon campaign, unfortunately I was unable to resolve the matter with them, so have to look at other options. I've decided to give BountySource one more go, hopefully the change in ownership will resolve the support issues.

A revised set of details is below, I've already released the 63.0.0-pre01 set of packages as a thankyou for all those who pledged funding (even though I haven't received any money as yet).

Bountysource

~~Release 63.0.0-pre01~~ (Complete)

When 10% of target reached

  • Upgraded CEF version, no major features included
  • Add SwiftShader support (WebGL with GPU disabled), requires package changes, some cleanup required as well
  • JSB binding issue outlined in https://github.com/cefsharp/CefSharp/issues/1203 will be present, the issue text/content will be sanatized to clearly outlined the issue and outline the limited workarounds currently available
  • Review commits to master that weren't merged by myself, there are a few that need some follow up work
  • [x] Branch master and prepare a Release branch as per previous releases.
  • [x] Update changelog and create release notes
  • [x] Release 63.0.0-pre01 packages to nuget.org
  • This set of packages won't resolve the JSB issue outlined above, it's simply for those who need an updated version of CEF and for testing purposes (will include all the changes to master since 57.0.0, assuming those changes pass code review)

~~Release 63.0.0-pre02~~ (Complete)

When 70% of target reached

  • Will include changes to restructure JavaScript binding(JSB) to work around https://github.com/cefsharp/CefSharp/issues/1203
    • [x] A CefSharpSettings.LegacyJavascriptBindingEnabled option will be added that preserves the current behavior, this will only be viable for those users who limit their requests to one domain per browser instance, any cross-site navigation and the bound objects will no longer be automatically registered.
    • [x] For the rewrite Bound objects will be registered upon request, this will be done in an async fashion, you will be able to Delete an object, defer object binding until later, register different objects in different frames/popups.
  • See more detailed description of issue at bottom of this document, I've included some basic samples from my working beta implementation.
  • [x] Update changelog and create release notes
  • [x] Release 63.0.0-pre02 set of packages to nuget.org

~~Release 63.0.0-pre03~~ (Complete)

When 90% of target reached

  • Will include bug fixes for

    • [x] #1903
    • [x] https://github.com/cefsharp/CefSharp/issues/1983 (Upgrade to VC++ 2015 will only happen if those funding the release vote for it)
    • [x] https://github.com/cefsharp/CefSharp/issues/2042
    • [x] https://github.com/cefsharp/CefSharp/issues/2060
    • [x] https://github.com/cefsharp/CefSharp/issues/2156
    • [x] https://github.com/cefsharp/CefSharp/issues/2074
  • Review and merge the following PRs

    • [x] https://github.com/cefsharp/CefSharp/pull/2157
    • [x] https://github.com/cefsharp/CefSharp/pull/2025
  • [x] Add ChromiumWebBrowserWithSnapshotSupport example to WPF example project

  • [x] Add new sections to General Usage Guide

  • [x] Add basic support for dynamic object to bindings

    public string DynamiObjectList(IList<dynamic> objects)
    {
        var builder = new StringBuilder();
    
        foreach(var browser in objects)
        {
            builder.Append("Browser(Name:" + browser.Name + ";Engine:" + browser.Engine.Name + ");");
        }
    
        return builder.ToString();
    }
    
  • Add basic example for WinForms SetAsChild to host browser in tab

  • [x] WPF improve layout rounding

    • Remove need for hacks outlined in https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#WPFBlurry
  • [x] Refactoring of OSR rendering to allow for pluggable implementation, will allow for users to implement their own rendering (DirectX rendering Changes merged into master, will hold off merging into the 63 branch as more testing is required.

  • [x] Add extension points for allow for IME implementation in user space, the cefsharp/CefSharp#2103 is a long way from being production ready

  • [x] Add VS2017 support to cef-binary project

  • [x] Cleanup CefTime handling

  • [x] Update changelog and create release notes

  • [x] Release a 63.0.0-pre03 set of packages to nuget.org

Release 63.0.0

When 100% of target reached

  • Bug fixes releaed to the JSB rewrites
  • Update changelog and create release notes
  • [x] Update documentation to include details about changes to JSB
  • Release 63.0.0 pacakges to nuget.org

Support

Priority will be given to those individuals/companies who contribute directly to funding the new release.

JavaScript Binding(JSB) issue

See https://github.com/cefsharp/CefSharp/issues/1203 for the bug tracking this issue

Current implementation relies on process-per-tab command line flag to limit the number of browser process per ChromiumWebBrowser instance to one, this worked well up until version 58 where the flag no longer works. Chromium will likely re-add support, there is no timeframe on the open tickets as yet, see https://bugs.chromium.org/p/chromium/issues/detail?id=719961 and https://bugs.chromium.org/p/chromium/issues/detail?id=717459

A handler in the main process for notification of sub-process creation and termination, and to receive IPC messages originating from the sub-process.

CEF will likely add a handler that can be used for resolving this issue and maintain the exact same functionality as exists today without having to use process-per-tab command line see https://bitbucket.org/chromiumembedded/cef/issues/2279/expose-custom-sub-process-handlers

As both options have no set timeframe we can rewrite our currently implementation to work slightly differently, bound objects will need to be registered slightly later, so won't be available immediately after the V8Context has been created. To get around this I've changed how objects are registered, see the code below for some code excerpts.

//For legacy biding we'll still have support for
browser.RegisterJsObject("bound", new BoundObject(), BindingOptions.DefaultBinder);
var bindingOptions = new BindingOptions() 
{
	Binder = BindingOptions.DefaultBinder.Binder,
	MethodInterceptor = new MethodInterceptorLogger() // intercept .net methods calls from js and log it
};
browser.RegisterAsyncJsObject("boundAsync", new AsyncBoundObject(), bindingOptions);

//Ability to resolve an object, instead of forcing object registration before the browser has been initialized.
browser.JavascriptObjectRepository.ResolveObject += (sender, e) =>
{
	var repo = e.ObjectRepository;
	if (e.ObjectName == "boundAsync2")
	{
		repo.Register("boundAsync2", new AsyncBoundObject(), isAsync: true, options: bindingOptions);
	}
};
<script type="text/javascript">
(async function()
{
	// <embed user provided code here>
	await CefSharp.BindObjectAsync("boundAsync", "bound");
	
	boundAsync.hello('CefSharp').then(function (res)
	{
		assert.equal(res, "Hello CefSharp")
		asyncCallback();
	});
})();

(async () =>
{
	await CefSharp.BindObjectAsync("boundAsync", "bound");
	
	boundAsync.hello('CefSharp').then(function (res)
	{
		assert.equal(res, "Hello CefSharp")
		asyncCallback();
	});
})();

CefSharp.BindObjectAsync("boundAsync2").then(function(result)
{
	boundAsync2.hello('CefSharp').then(function (res)
	{
		assert.equal(res, "Hello CefSharp")
                // NOTE the ability to delete a bound object
		assert.equal(true, CefSharp.DeleteBoundObject("boundAsync2"), "Object was unbound");
		assert.ok(window.boundAsync2 === undefined, "boundAsync2 is now undefined");
		asyncCallback();
	});
});
</script>

amaitland avatar Jan 17 '18 07:01 amaitland

Anyone have any bugs to report for 63.0.0-pre03? Happy to take feedback on the method names also, if they're going to change then it needs to be now πŸ˜„

amaitland avatar Feb 06 '18 01:02 amaitland

We haven't found anything new yet, but we are still using the legacy binding mechanism because the new binding mechanism requires us to make some changes on the Javascript side.

chris-araman avatar Feb 06 '18 02:02 chris-araman

I have a question. From 57 to 63 -pre03 all I need to change for object binding is below?

// v57 browser.RegisterJsObject("external", new JSCallback(), new BindingOptions { CamelCaseJavascriptNames = false });

// v63 browser.JavascriptObjectRepository.Register("external", new JSCallback(), false, new BindingOptions { CamelCaseJavascriptNames = false });

I can't see my object from web dev tool console. window.external is not my object. Is there something I need to change also?

joewen avatar Feb 06 '18 03:02 joewen

We haven't found anything new yet, but we are still using the legacy binding mechanism because the new binding mechanism requires us to make some changes on the Javascript side.

@chris-araman Thanks for the feedback.

I have a question. From 57 to 63 -pre03 all I need to change for object binding is below?

@joewen Details are #2246

amaitland avatar Feb 06 '18 05:02 amaitland

I've generated the 63.0.0 packages and they're currently sitting on the MyGet feed, the following branches of the MinimalExample have been upgraded:

https://github.com/cefsharp/CefSharp.MinimalExample/tree/demo/anycpu https://github.com/cefsharp/CefSharp.MinimalExample/tree/cefsharp/63

Will do a little more testing before releasing to Nuget.org, will post when they're up. I would usually like to wait a little longer before releasing the packages give everyone a chance to test a little more. The pending arrival of my first child (boy for those who are interested) means I don't quite have the luxury of time, could arrive any day. Once the dust settles will look at doing a 63.0.1 bug fix release if it's called for.

amaitland avatar Feb 08 '18 05:02 amaitland

Congratulations! 🍼πŸ₯

chris-araman avatar Feb 08 '18 05:02 chris-araman

The 63.0.0 packages have been pushed to Nuget.org, they should appear in the next hour or two.

amaitland avatar Feb 08 '18 07:02 amaitland

Thats great. thank you for your efforts in updating the lib. I'd get some rest now whilst the coast is clear!

dandotevans avatar Feb 08 '18 07:02 dandotevans

@amaitland A bit off-topic, in regards to patreon/bountysource. Have you considered using https://opencollective.com/ ?

cztomczak avatar Feb 25 '18 06:02 cztomczak

Just an FYI I'll release a 63.0.2 set of packages shortly that will fix a few of the problems that have been reported.

@amaitland A bit off-topic, in regards to patreon/bountysource. Have you considered using https://opencollective.com/ ?

@cztomczak I've not heard of that one before, will have a look. Have you tried them personally?

amaitland avatar Mar 06 '18 03:03 amaitland

@amaitland I just stumbled upon it recently and it looks good, the webpack project uses it. I haven't used it myself. And here is another one link you might find interesting, also found it just a few days ago: https://github.com/nayafia/lemonade-stand ("A handy guide to financial support for open source").

cztomczak avatar Mar 06 '18 03:03 cztomczak

The General Usage Guide has been updated, see https://github.com/cefsharp/CefSharp/wiki/General-Usage#3-how-do-you-expose-a-net-class-to-javascript

Comments welcome. That's the last piece before I close this.

Will give it a few days for people to provide feedback on the General Usage Guide.

Thanks for everyone's support!

amaitland avatar Mar 23 '18 03:03 amaitland

63.03 has been released, see https://github.com/cefsharp/CefSharp/releases/tag/v63.0.3 for details

amaitland avatar Mar 27 '18 03:03 amaitland

Closing this issue now, if anyone has further feedback on the JSB General Usage Guide changes, then comments welcome.

amaitland avatar Mar 28 '18 03:03 amaitland