4520 Commits

Author SHA1 Message Date
amaitland 38663e3c99 JSB - JavascriptObjectRepository.ResolveObject was only being called when object previously registered
The HasBoundObjects check has been removed, now we always attempt to GetObjects and return a response

Resolves #2273
v63.0.1
2018-02-13 12:55:48 +10:00
amaitland bea70ccd82 Xml Doc improvements
Fix some invalid markup
Move some unmanaged constructors and implicit conversion to internal
2018-02-09 13:37:49 +10:00
amaitland cc8c7f0bbf Release 63.0.0 and remove financial support section 2018-02-08 15:03:36 +10:00
amaitland 5f02b6775f CookieManager - Make unmanaged constructor internal v63.0.0 2018-02-08 10:54:50 +10:00
amaitland 3806d5f431 ICookieManager - Improve xmldoc wording around how methods are executed.
Most methods are executed in an async fashion with a callback that notifies of completion.
Set ICookieManager.DeleteCookies params to null by default (they're optional)
2018-02-08 10:54:50 +10:00
amaitland 6ba6b7a799 JSB - Improve xmldoc for IJavascriptObjectRepository 2018-02-07 12:56:53 +10:00
amaitland fa30670829 ScriptedMethodsTest.html - Update to use JSB v2 CefSharp.BindObjectAsync 2018-02-07 12:56:53 +10:00
amaitland 13c927a49c Readme.md Update Release Branches table. 2018-02-07 12:56:52 +10:00
Chris 20bd345865 WinForms: Prevent designer from setting any default values (#2265) 2018-02-06 09:24:14 +10:00
campersau c8d725fbae add missing space in exception message (#2263)
https://github.com/cefsharp/CefSharp/commit/a086b4b7802da4d8ddc60a38e309968ba8d4cce6
2018-02-06 09:24:14 +10:00
amaitland d633750912 Minor API Cleanup
- Move ITaskScheduler and InternalWebBrowserExtensions into Internals folder (not for public use)
- Improve some of the API xml doc
2018-02-06 09:24:13 +10:00
amaitland 980b9fe7f3 WinForms - Temp workaround for a bug where the address passed into the constructor isn't always loading 2018-02-06 09:24:13 +10:00
amaitland a86e8a5e3b WPF - Throw exception if Load called before browser initialized
Follow up to #2260
2018-02-06 09:24:12 +10:00
Chris c39e288c42 WinForms: Prevent designer from setting default values (#2261) 2018-02-06 09:24:12 +10:00
Chris 4f2a10c8b1 Revert build breaking change (#2262) 2018-02-06 09:24:11 +10:00
amaitland 9139b164f9 WinForms - Add custom Designer
Add some custom designer attributes
Converted the logo.png to a 16x16 bmp as a short term placeholder (someone is welcome to contribute something better)
Hide all the handlers from the designer
2018-02-06 09:24:11 +10:00
amaitland 196a073078 Remove BrowserSettings.OffScreenTransparentBackground
No longer used, transparency controller through setting BackgroundColor property.
2018-02-06 09:24:11 +10:00
amaitland cb30919ef6 JSB LegacyBindingTest.html Import Property Tests
Copy the tests that were added to BindingTest.html
2018-02-06 09:24:10 +10:00
amaitland 60c7b65982 MyGet Key Update
Update to using a limited access expiry key from my account (amaitland)
v63.0.0-pre03
2018-01-30 11:28:06 +10:00
amaitland d5d68ee8e9 JSB Add Caching
Bound object meta data is cached within a render process
CefSharp.IsObjectCached - JS method to test if object cached
CefSharp.RemoveObjectFromCache - JS method to remove object from cache

If a request is made for multiple objects with not all of them being cached then a IPC message is sent.
When all objects already bound return response object for consistency
FindBrowserWrapper signature change - it's really not safe to throw a managed exception in the middle of unmanaged code, changed to logging and null checking
JavascriptObjectRepository - Add All Constant - Used when All objects are requested for binding (objects can also be requested by name)

TODO: Add a JS library to improve user experience when dealing with cached objects
2018-01-30 11:07:27 +10:00
amaitland ecd4fd09d8 JSB - Fix bug where properties weren't being analysed for sync bound objects
Added test case
Reordered method to make it more logical, used named properties so it's clear what's being set.
Add TODO for unresolved object event
2018-01-30 11:07:26 +10:00
amaitland 55ea42be2c JSB BindObjectAsync return response object
Can now return additional properties, still need better error handling
2018-01-30 11:07:25 +10:00
amaitland 8ff20417e6 Disable CanExecuteJavascriptInMainFrame checks for ExecuteScriptAsync/EvaluateScriptAsync
See #2250 for details (appears to be bug in `CEF`)
2018-01-24 10:17:05 +10:00
amaitland 9699083532 WinForms Example - Add binder to registered objects
Required to run BindingTest.html
2018-01-24 10:02:44 +10:00
amaitland 60cb75cff2 Fix nuget package mistakes Examples Projects and Test project
Slightly modified packages and reused the same version number which caused some problems
(Manually fixed package references)
2018-01-24 09:42:33 +10:00
amaitland 8978757848 WinForms Example - Add additional JS binding 2018-01-24 09:42:33 +10:00
amaitland cb38f09756 IJavascriptObjectRepository.Register - Improve isAsync xml doco comment 2018-01-24 09:42:32 +10:00
amaitland 6cb98ec81e Nupkg Restructure
Resolves #2156

Nuget packages updated to use ItemGroup None instead of Copy target
Nuget props restructure to support Win32 target
x86 and Win32 targets are exactly the same in content, they differ in name only, so switched to using an <Otherwise/> block
Remove AnyCpu <When/> option from props files and consolidate with x86 and Win32. Set Private to false and rely on the
<None/> entires to copy the files to the output folder

Ideally would move the OffScreen, WinForms and WPF targets file content to the props (as they're actually props now), unfortunately
we need guaranteed ordering and Nuget 2.8.x doesn't provide that, if we leave them as .targets it'll happen late enough to make sure
the cef.redist list of files is provided.
https://github.com/NuGet/Home/issues/4229#issuecomment-271387190
v63.0.0-pre02
2018-01-23 12:46:57 +10:00
amaitland ebaa81fd07 Example projects update app.manifest version number 2018-01-23 12:46:57 +10:00
amaitland 4ca61cfe91 Nuget packages - create public properties for common, winforms, wpf and offscreen targets so they can be reused if required
Combine Win32 and x86 target in CefSharp.Common.targets
2018-01-23 12:46:56 +10:00
amaitland 195e62bcda OffScreen/OffScreenBrowserBasicFacts- Add CrossSiteNavigationJavascriptBinding Test case
Very basic, little crude, passing though
Still having some problems with Xunit and shutting down on the correct thread.
2018-01-23 12:46:56 +10:00
amaitland 523fcf11a2 WPF Example - Add LegacyBinding options and some better comments 2018-01-23 12:46:55 +10:00
amaitland b5ce434521 IJavascriptObjectRepository.ObjectBoundInJavascript - Fix bug and add example 2018-01-22 12:18:17 +10:00
amaitland cbde8a82de Manually revert OnPaint rewrite changes that
Accidentally committed in https://github.com/cefsharp/CefSharp/commit/fb053142d7ae988ed9faf2bdbb6de4e320b1bde6
2018-01-22 12:12:05 +10:00
amaitland 4b422dac30 IJavascriptObjectRepositry - Add ObjectBoundInJavascript event
Executed on the thread pool when objects are bound in JS
2018-01-22 11:59:13 +10:00
amaitland eae578cc9b WcfEnabledSubProcess - Add better error handling when closing the WCF channel/factory
Resolves #2074
2018-01-22 11:33:13 +10:00
amaitland fb18122c26 WPF - OnMouseLeave send actual x,y coordinates not just the -1 and call SendMouseClickEvent when left mouse button pressed
Resolves #2060

# Conflicts:
#	CefSharp.Wpf/ChromiumWebBrowser.cs
2018-01-22 11:33:12 +10:00
amaitland 58576c6118 Hide tooltip if already open when textchanged
Follow up to #2232
2018-01-22 11:33:12 +10:00
Daniel Bretzigheimer 974e221399 tooltip updates it position when the tooltip text is changed (#2232)
* tooltip updates it position when the tooltip text is changed

* encoding fixed
2018-01-22 11:33:11 +10:00
amaitland 7cd0eb1991 Fix typo 2018-01-22 11:33:11 +10:00
amaitland 50f8f9e10e JSB ResolveObject WcfEnabled = false throw exception if attempt to register sync object
Update the examples to use newer Register method as Legacy options is disabled by default
2018-01-22 11:33:10 +10:00
Alex Maitland 44fdfa94c8 Implement Javascript Binding v2 (#2247)
* JSB Rewrite - Add CefSharp.RegisterBoundObject javascript method

To get around the problem of IPC timing, I've reversed the communication, now it's the render process requesting
the bound objects, the implementation is incomplete at this stage, more just a basic proof of concept

Rewrite BindingTest.html using QUnit
One of the tests doesn't map correctly as it requires def user interaction

TODO:

- Get objects by name
- Rename Messages.h values that relate to this change so they are more descriptive
- Better error handling
- Caching of objects within a render process
- Investigate global context options, don't think it's possible to call an async method directly in the global context

# Conflicts:
#	CefSharp.Example/Resources/BindingTest.html

* JSB Improve Request/Response message names

* BindingTest.html - Output stress test results

* Remove JavascriptRootObject was leftover from time we used WCF to transmit objects

* JavascriptObjectRepository - Objects are now sent in the same list with an IsAsync flag

Separation when sending over IPC with two unique lists isn't necessary

* JavascriptObjectRepository - Return objects by name or return all by default

Untabify CefAppUnmanagedWrapper.cpp
Add minor comment to CefBrowserWrapper for a reminder that we use Frame Identifier as dictionary key

* Add //TODO: JSB comments for work that's left to be done

Ideally within a render process we cache bound objects once they've been communicated,
It would also be nice to make multiple binding requests so objects can later be added dynamically

* JSB Allow multiple calls to CefSharp.RegisterBoundObject

Update BindingTest.html to name two distinct calls to different bound objects

* JSB - Add some notes about caching, no working implementation yet

* JSB - Dynamically Register object on Request

* JSB Add ability to unbind an object and rename RegisterBoundObject to BindObjectAsync

# Conflicts:
#	CefSharp.Example/Resources/BindingTest.html

* JSB BindObjectAsync - if objects already bound then return false

* JSB - Ignore Indexer properties

Were previously throwing an exception

* JSB - Add LegacyJavascriptBindingEnabled option so preserve existing behaviour

This is only useful for SPA application and those that only navigate to pages
hosting within a single domain. Any sort of cross-site navigation and a new
render process will be spawned and objects won't be bound automatically
(You can use the new methods to request they're bound yourself, at least in theory,
more testing required on this)

* Add LegacyBindingTest.html

Current disabled by default. To enable uncomment CefSharpSettings.LegacyJavascriptBindingEnabled = true;
in CefExample.cs

* RegisterJsObject and RegisterAsyncJsObject can now only be used when CefSharpSettings.LegacyJavascriptBindingEnabled = true

See https://github.com/cefsharp/CefSharp/issues/2246 for details
2018-01-22 11:33:09 +10:00
amaitland 4cb81d4b99 WPF IWpfKeyboardHandler Changes
- Make public so users can implement their own handler (the OSR IME patch can be rewritten as a IWpfKeyboardHandler)
- Formatting for consistency
- Make methods virtual

Follow up to #2056
2018-01-22 11:33:09 +10:00
João Neves fb053142d7 Prevent accelerator keys to work when typing text (#2056)
* Call correct base method and handle text input in case event wasn't handled
* Removed SourceHook method
* Added previous keyboard handling logic and ability to use it through a property

# Conflicts:
#	CefSharp.Wpf/ChromiumWebBrowser.cs
2018-01-22 11:33:08 +10:00
amaitland 6133ffe107 WPF Example - windowInfo.SetAsWindowless no only takes a single param (remove transparency param as that's now set via backgroundcolor) 2018-01-22 11:32:29 +10:00
amaitland 5675c3bc9f WPF Popup bind layout transform to parent
Popup needs to allow transparency or only ScaleTrasnform will work (comment in reference source see https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/Primitives/Popup.cs,1713)
Bind the parent LayoutTransformProperty to the popup LayoutTransformProperty

Resolves #2151
2018-01-22 11:32:28 +10:00
amaitland ec5b0787ea Untabify
Follow up to #2218
2018-01-22 11:32:28 +10:00
João Neves eacffebb68 Dont discard null Values from arrays (#2218)
* Don't discard arrays that contain null values
* Revert unintended change in this branch
* Added qunit test
* Code review and added new tests
2018-01-22 11:32:27 +10:00
amaitland 6c81ca20e5 CefDirectRect was removed, replace with Rect 2018-01-22 11:32:26 +10:00
amaitland ae1e6c4f3e Cleanup CefTime handling - make consistent across all projects
# Conflicts:
#	CefSharp.Core/ResourceHandlerWrapper.cpp
2018-01-22 11:32:26 +10:00