OffScreen
- Now maintains a raw Byte[] buffer that is used to create the GDI bitmaps
can be overridden and raw buffer access granted (eliminates the forced memory copy to the memory mapped view)
WPF
- MemoryMappedFile.CreateNew is now used to create the in memory view and copy the buffer
- InteropBitmapFactory only create new MemoryMappedFile selectively. If the MemoryMappedFile is larger than we require then just reuse it rather than
releasing then allocating a smaller section of memory that's used for double buffering with InteropBitmap and WritableBitmap
- Removed CefDirtyRect and used existing Rect class
- Rename rendering event to Paint, still preferable to implement IBitmapFactory or subclass ChromiumWebBrowser
- Update ChromiumWebBrowserWithScreenshotSupport to support new rendering method - not very well tested.
Resolves#2237
This reverts the change from #1962 where we manually rounded up - it's still possible to do this by inheriting from ChromiumWebBrowser and overriding GetViewRect should you choose to
Easy way to test the rounding changes is to add Margin="0.5,0.5,0,0" to a ChromiumWebBrowser instance in xaml
You can manually disable layout rounding of course UseLayoutRounding="False" in xaml on the control
Structs and classes can now be returned from an async method
Properties and fields are supported now. The returned class/struct is readonly effectively, no updates will be sent to the bound object.
Just to clarify this is only for objects bound using RegisterAsyncJsObject
Rewrite the tests using the QUnit framework, makes for much nicer presentation and should be easier to maintain them, also verifies tests completed successfully.
Tests are wrapped in an anon closure, will be used later for some JSB changes.
As ExpandoObject implements IDictionary we can use it interchangeable with only minor breaking changes.
Those expecting Dictionary<string, object> should change to IDictionary<string, object> or ExpandoObject for their param types
This will also impact anyone who has implemented their own custom IBinder
I'd suggest changing the type checking from explicitly checking Dictionary<string, object> to use Type.IsAssignableFrom or another method of comparison
DefaultBinder binder has been updated to accommodate ExpandoObject (now being returned by ObjectsSerialization.cpp)
Add new async binding for testing new assignment method
Rewrite some of the async bound object tests to use await and let - modernize them
Allow user to override and then specify their own behaviour
Call base methods in overrides - reference source shows the protected methods are empty,
we're just doing this for correctness (compiler should optimise the calls away)
WPF - Add checks so if RequestContext is set after browser created an exception is thrown
WinForms - Add checks so if RequestContext is set after browser created an exception is thrown
Remove call to PresentationSource.FromVisual(this) as it's very expensive, walks up the tree, it's also unnecessary as we keep a reference to the visual HwndSource
VC++2017(v141) is compatible with VC++2015(v140), which enables us to use the v141 toolset to compile against the
v140 libcef_dll_wrapper.lib - not necessary to install the VC++2015 compiler as part of a clean VS2017 install
Follow up to #2179
* Added default implementation of IRequestHandler
* Functions made virtual
* Include DefaultRequestHandler in csproj (merge fix)
* Moved DefaultRequestHandler to CefSharp.Handler namespace; added comments